31.07.2013, 22:25
Everytime I do /cpcreate my server crashes:
Command:
server.log
Command:
PHP код:
CMD:cpcreate(playerid, params[])
{
new Float:size, string[200], tag[10];
if(sscanf(params, "s[10]f", tag, size)) return SendClientMessage(playerid, -1, "USAGE: /cpcreate [tag] [size]");
new Float: X, Float: Y, Float: Z, checkpoint, world, interior;
GetPlayerPos(playerid, X, Y, Z);
interior = GetPlayerInterior(playerid);
world = GetPlayerVirtualWorld(playerid);
CreateDynamicCP(X, Y, Z, size, world, interior, -1, 100.0);
format(string, sizeof(string), "[%s] CreateDynamicCP(%f, %f, %f, %f, %d, %d, -1, 100.0);",tag, X, Y, Z, size, world, interior);
SendFMessage(playerid, COLOR_LIGHTRED, string);
SaveFile("Dynamic.txt", string);
return 1;
}
Код:
[17:27:14] sscanf warning: String buffer overflow.