]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make these debug prints more useful (actually show the notif name!)
authorSamual Lenks <samual@xonotic.org>
Sat, 23 Feb 2013 19:57:45 +0000 (14:57 -0500)
committerSamual Lenks <samual@xonotic.org>
Sat, 23 Feb 2013 19:57:45 +0000 (14:57 -0500)
qcsrc/common/notifications.qc

index e9c0e8ebc6b9d3a6508b410fd56c164bf6433147..7912fbaacad236cb27557f48c6b39d8ef3d6f9cc 100644 (file)
@@ -230,22 +230,22 @@ void Local_Notification(float net_type, float net_name, ...count)
        {
                backtrace(sprintf(
                        strcat(
-                               "Not enough arguments for Local_Notification! ",
+                               "Not enough arguments for Local_Notification(%d, %s, ...)! ",
                                "stringcount(%d) + floatcount(%d) > count(%d)\n", 
                                "Check the definition and function call for accuracy...?\n"
                        ),
-                       notif.nent_stringcount, notif.nent_floatcount, count));
+                       net_type, notif.nent_name, notif.nent_stringcount, notif.nent_floatcount, count));
                return;
        }
        else if((notif.nent_stringcount + notif.nent_floatcount) < count)
        {
                backtrace(sprintf(
                        strcat(
-                               "Too many arguments for Local_Notification! ",
+                               "Too many arguments for Local_Notification(%d, %s, ...)! ",
                                "stringcount(%d) + floatcount(%d) < count(%d)\n",
                                "Check the definition and function call for accuracy...?\n"
                        ),
-                       notif.nent_stringcount, notif.nent_floatcount, count));
+                       net_type, notif.nent_name, notif.nent_stringcount, notif.nent_floatcount, count));
                return;
        }
 
@@ -557,22 +557,22 @@ void Send_Notification(float broadcast, entity client,
        {
                backtrace(sprintf(
                        strcat(
-                               "Not enough arguments for Send_Notification! ",
+                               "Not enough arguments for Send_Notification(%d, %d, %s, ...)! ",
                                "stringcount(%d) + floatcount(%d) > count(%d)\n", 
                                "Check the definition and function call for accuracy...?\n"
                        ),
-                       notif.nent_stringcount, notif.nent_floatcount, count));
+                       broadcast, net_type, notif.nent_name, notif.nent_stringcount, notif.nent_floatcount, count));
                return;
        }
        else if((notif.nent_stringcount + notif.nent_floatcount) < count)
        {
                backtrace(sprintf(
                        strcat(
-                               "Too many arguments for Send_Notification! ",
+                               "Too many arguments for Send_Notification(%d, %d, %s, ...)! ",
                                "stringcount(%d) + floatcount(%d) < count(%d)\n",
                                "Check the definition and function call for accuracy...?\n"
                        ),
-                       notif.nent_stringcount, notif.nent_floatcount, count));
+                       broadcast, net_type, notif.nent_name, notif.nent_stringcount, notif.nent_floatcount, count));
                return;
        }