From 3849649d827d6841c9545cc8644912854781dce0 Mon Sep 17 00:00:00 2001 From: Wesley Johnson Date: Tue, 8 Jul 2025 13:58:52 +0000 Subject: Fix error messages in `countitem` and `end` built-ins Function: builtin_countitem The error msg using nameid made no sense as it is output only when there is no nameid info. Changed to "no item ID". Function: builtin_end The error msg "close in a callfunc or callsub", refers to the wrong function. Changed to msg "end in a callfunc or callsub". --- src/map/script-fun.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp index 64ba542..58bca90 100644 --- a/src/map/script-fun.cpp +++ b/src/map/script-fun.cpp @@ -1920,7 +1920,7 @@ void builtin_countitem(ScriptState *st) else { if (battle_config.error_log) - PRINTF("wrong item ID: countitem (%i)\n"_fmt, nameid); + PRINTF("builtin_countitem: no item ID\n"_fmt); } push_int(st->stack, count); @@ -2491,9 +2491,9 @@ void builtin_end(ScriptState *st) { dumb_ptr nd = map_id_is_npc(st->oid); if(nd) - PRINTF("Deprecated: close in a callfunc or callsub! @ %s\n"_fmt, nd->name); + PRINTF("Deprecated: end in a callfunc or callsub! @ %s\n"_fmt, nd->name); else - PRINTF("Deprecated: close in a callfunc or callsub! (no npc)\n"_fmt); + PRINTF("Deprecated: end in a callfunc or callsub! (no npc)\n"_fmt); } st->state = ScriptEndState::END; } -- cgit v1.2.3-70-g09d2