25.12.2014, 15:22
I'm having an issue with a custom string formatting 'Stock', thats throwing out "error 047: array sizes do not match, or destination array is too small", Even though i'm using this kinda of system in a few more functions.
pawn Code:
stock CreateFormattedString(const msg[], {Float,_}:...)
{
static
string[268];
if (numargs() == 1)
{
return msg;
}
else
{
new args = numargs();
while (--args >= 1)
{
#emit LCTRL 5
#emit LOAD.S.alt args
#emit SHL.C.alt 2
#emit ADD
#emit ADD.C 12
#emit LOAD.I
#emit PUSH.pri
}
#emit PUSH.S msg
#emit PUSH.C 268
#emit PUSH.C string
#emit LOAD.S.pri 8
#emit PUSH.pri
#emit SYSREQ.C format
return string;
#emit LCTRL 5
#emit SCTRL 4
#emit RETN
}
}