diff options
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/script.c b/src/map/script.c index 739104f32..bf0b4f652 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -585,7 +585,7 @@ static void check_event(struct script_state *st, const char *evt) } else { - ShowError("NPC event parameter deprecated! Please use 'NPCNAME::OnEVENT' instead of '%s'.\n", evt); + ShowWarning("NPC event parameter deprecated! Please use 'NPCNAME::OnEVENT' instead of '%s'.\n", evt); script_reportsrc(st); } } @@ -8187,8 +8187,8 @@ BUILDIN_FUNC(cmdothernpc) // Added by RoVeRT { const char* npc = script_getstr(st,2); const char* command = script_getstr(st,3); - char event[51]; - snprintf(event, 51, "%s::OnCommand%s", npc, command); + char event[EVENT_NAME_LENGTH]; + snprintf(event, sizeof(event), "%s::OnCommand%s", npc, command); check_event(st, event); npc_event_do(event); return 0; |