22.01.2011, 19:20
(
Последний раз редактировалось Blacklite; 22.01.2011 в 20:14.
)
Can anyone see a problem with this? The server always crashes on the line with CallLocalFunction...
The last line of output is ALWAYS:
(the function changes depending on which one I am trying to call)
pawn Код:
if (strlen(full_cmd) > 0) {
format(full_cmd, sizeof(full_cmd), "cmd_%s", full_cmd);
if (IsPlayerConnected(playerid) && funcidx(full_cmd) != -1) {
if (strcmp("NULL", extravars) == 0) {
format(extravars, sstrlen(extravars), "");
}
printf("#%d %s(%d, %s)", funcidx(full_cmd), full_cmd, playerid, extravars);
if (!CallLocalFunction(full_cmd, "is", playerid, extravars)) {
SendClientMessage(playerid, RED, "Invalid command. Type /cmds to see a list of available commands.");
}
printf("#%d %s(%d, %s) executed!", funcidx(full_cmd), full_cmd, playerid, extravars);
}
}
Код:
[10:15:16] #275 cmd_time(16, )