]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
made QC error() and objerror() builtins print the error string above and below the...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 22 Feb 2006 07:46:31 +0000 (07:46 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 22 Feb 2006 07:46:31 +0000 (07:46 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6000 d7cf8633-e32d-0410-b094-e92efae38249

prvm_cmds.c

index 85af22e2236a5bee4b6d24a445242dff869823fd..722582e731f6b29b7e7af3e3ac2760e88cdd9a1e 100644 (file)
@@ -116,14 +116,14 @@ void VM_error (void)
        char string[VM_STRINGTEMP_LENGTH];
 
        VM_VarString(0, string, sizeof(string));
-       Con_Printf("======%S ERROR in %s:\n%s\n", PRVM_NAME, PRVM_GetString(prog->xfunction->s_name), string);
+       Con_Printf("======%s ERROR in %s:\n%s\n", PRVM_NAME, PRVM_GetString(prog->xfunction->s_name), string);
        if(prog->self)
        {
                ed = PRVM_G_EDICT(prog->self->ofs);
                PRVM_ED_Print(ed);
        }
 
-       PRVM_ERROR ("%s: Program error", PRVM_NAME);
+       PRVM_ERROR ("%s: Program error in function %s:\n%s\n", PRVM_NAME, PRVM_GetString(prog->xfunction->s_name), string);
 }
 
 /*
@@ -142,7 +142,7 @@ void VM_objerror (void)
        char string[VM_STRINGTEMP_LENGTH];
 
        VM_VarString(0, string, sizeof(string));
-       Con_Printf("======%s OBJECT ERROR in %s:\n%s\n", PRVM_NAME, PRVM_GetString(prog->xfunction->s_name), string);
+       Con_Printf("======OBJECT ERROR======\n", PRVM_NAME, PRVM_GetString(prog->xfunction->s_name), string);
        if(prog->self)
        {
                ed = PRVM_G_EDICT (prog->self->ofs);
@@ -153,6 +153,7 @@ void VM_objerror (void)
        else
                // objerror has to display the object fields -> else call
                PRVM_ERROR ("VM_objecterror: self not defined !");
+       Con_Printf("%s OBJECT ERROR in %s:\n%s\n", PRVM_NAME, PRVM_GetString(prog->xfunction->s_name), string);
 }
 
 /*