20.12.2017, 16:14
If you already use sscanf, you can make
/update [add, edit, etc.] rather than /editupdate /addupdate
Why are you using PVars?
What if I use "UID" PVar in my gamemode, that'd mean that your filterscript would overwrite my PVars
Max. length of a message that you can send in a SendClientMessage is 144, so the array must be 145 with one for terminal.
Why are you using format to append string? use strcat
Format would just be slower for such simple task.
The dates are around 10 char, surely not 256 char
2+2+4+3=11 max.
You have 245 wasted cells
Its better to create the array outside the loop than to create an array for every loop, would just eat up processing time, moreover, if you'd create it outside, empty the string every loop with ``string[0] = EOS;``
I've noticed that you haven't stated max. length of string for an update line to be?
/update [add, edit, etc.] rather than /editupdate /addupdate
Why are you using PVars?
What if I use "UID" PVar in my gamemode, that'd mean that your filterscript would overwrite my PVars
Код:
new str[256];
Код:
format(tmp4, sizeof(tmp4), "Updates\tDate Of Update\n%s", tmp3);
Код:
format(s, sizeof(s), "update%d", x);
Format would just be slower for such simple task.
Код:
h[256]
Код:
%d/%d/%d
You have 245 wasted cells
Код:
for(new x=1 ; x<560 ; x++) { new s[256];
I've noticed that you haven't stated max. length of string for an update line to be?