diff --git a/src/common/scripting/interface/vmnatives.cpp b/src/common/scripting/interface/vmnatives.cpp index 51b7e796ce..7754cca221 100644 --- a/src/common/scripting/interface/vmnatives.cpp +++ b/src/common/scripting/interface/vmnatives.cpp @@ -1009,13 +1009,15 @@ DEFINE_ACTION_FUNCTION(_Console, Printf) return 0; } -DEFINE_ACTION_FUNCTION(_Console, PrintString) +DEFINE_ACTION_FUNCTION(_Console, PrintfEx) { PARAM_PROLOGUE; PARAM_INT(printlevel); - PARAM_STRING(str); + PARAM_VA_POINTER(va_reginfo) // Get the hidden type information array - Printf(printlevel,"%s\n", str.GetChars()); + FString s = FStringFormat(VM_ARGS_NAMES,1); + + Printf(printlevel,"%s\n", s.GetChars()); return 0; } diff --git a/wadsrc/static/zscript/engine/base.zs b/wadsrc/static/zscript/engine/base.zs index c46c1612aa..1f2d8a5abd 100644 --- a/wadsrc/static/zscript/engine/base.zs +++ b/wadsrc/static/zscript/engine/base.zs @@ -615,7 +615,7 @@ struct Console native PRINT_NOTIFY = 4096, // Flag - add to game-native notify display - messages without this only go to the generic notification buffer. }; - native static void PrintString(int printlevel, string str); + native static vararg void PrintfEx(int printlevel, string fmt, ...); } struct CVar native