From: bones_was_here Date: Thu, 11 Jan 2024 23:08:05 +0000 (+1000) Subject: PRVM: fix some incorrect warning messages X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=fdda1d061b9ed82fd7d07d7ce3890a6ea64d6309;p=xonotic%2Fdarkplaces.git PRVM: fix some incorrect warning messages Closes https://gitlab.com/xonotic/darkplaces/-/issues/379 See 2322e173520b68ae6ca217024a47dfb8bbc12473 Signed-off-by: bones_was_here --- diff --git a/prvm_execprogram.h b/prvm_execprogram.h index 99a89906..a386aa67 100644 --- a/prvm_execprogram.h +++ b/prvm_execprogram.h @@ -489,7 +489,7 @@ int i; if ((prvm_uint_t)OPB->_int < cached_entityfields && !cached_allowworldwrites) { PRE_ERROR(); - VM_Warning(prog, "Attempted assignment to NULL entity field .%s (%i) in %s\n", PRVM_GetString(prog, PRVM_ED_FieldAtOfs(prog, OPB->_int)->s_name), (int)OPB->_int, prog->name); + VM_Warning(prog, "Attempted assignment to world.%s (edictnum 0 field %i) in %s\n", PRVM_GetString(prog, PRVM_ED_FieldAtOfs(prog, OPB->_int)->s_name), (int)OPB->_int, prog->name); } } ptr = (prvm_eval_t *)(cached_edictsfields + OPB->_int); @@ -507,7 +507,7 @@ int i; if ((prvm_uint_t)OPB->_int < cached_entityfields && !cached_allowworldwrites) { PRE_ERROR(); - VM_Warning(prog, "Attempted assignment to NULL entity field .%s (%i) in %s\n", PRVM_GetString(prog, PRVM_ED_FieldAtOfs(prog, OPB->_int)->s_name), (int)OPB->_int, prog->name); + VM_Warning(prog, "Attempted assignment to world.%s (edictnum 0 field %i) in %s\n", PRVM_GetString(prog, PRVM_ED_FieldAtOfs(prog, OPB->_int)->s_name), (int)OPB->_int, prog->name); } } // refresh the garbage collection on the string - this guards @@ -531,7 +531,7 @@ int i; if ((prvm_uint_t)OPB->_int < cached_entityfields && !cached_allowworldwrites) { PRE_ERROR(); - VM_Warning(prog, "Attempted assignment to NULL entity field .%s (%i) in %s\n", PRVM_GetString(prog, PRVM_ED_FieldAtOfs(prog, OPB->_int)->s_name), (int)OPB->_int, prog->name); + VM_Warning(prog, "Attempted assignment to world.%s (edictnum 0 field %i) in %s\n", PRVM_GetString(prog, PRVM_ED_FieldAtOfs(prog, OPB->_int)->s_name), (int)OPB->_int, prog->name); } } ptr = (prvm_eval_t *)(cached_edictsfields + OPB->_int); @@ -557,7 +557,7 @@ int i; if (OPA->edict == 0 && !cached_allowworldwrites) { PRE_ERROR(); - prog->error_cmd("Forbidden assignment to NULL entity in %s", prog->name); + prog->error_cmd("Forbidden assignment to world (edictnum 0) in %s", prog->name); goto cleanup; } #endif