if(!strcmp(cmd, "/PlayerCommand", true))
{
new command[128];
cmd = strtok(cmdtext, idx);
if(!strlen(cmd)) return ...
command = strtok(cmdtext, idx);
if(!strlen(command)) return ...
OnPlayerCommandText(strval(cmd), command);
return true;
}
CMD:playercommand(playerid, params[])
{
if(sscanf(params, "rs[128]", params[0], params[1])) return ...
cmd_params[1](params[0], params);
return true;
}
C:\Users\*\Desktop\* 0.3x\gamemodes\*.pwn(1062) : error 029: invalid expression, assumed zero
C:\Users\*\Desktop\* 0.3x\gamemodes\*.pwn(1063) : error 017: undefined symbol "cmd_params"
C:\Users\*\Desktop\* 0.3x\gamemodes\*.pwn(1063) : warning 215: expression has no effect
C:\Users\*\Desktop\* 0.3x\gamemodes\*.pwn(1063) : error 001: expected token: ";", but found "]"
C:\Users\*\Desktop\* 0.3x\gamemodes\*.pwn(1063) : error 029: invalid expression, assumed zero
C:\Users\*\Desktop\* 0.3x\gamemodes\*.pwn(1063) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.
CMD:playercommand(playerid, params[]) {
if(sscanf(params, "us[128]", params[0], params[1])) return ...
CallLocalFunction("OnPlayerCommandText", "is", params[0], params[1]);
return true;
}
pawn Код:
|
Changed it to CallLocalFunction because their is an als hook in zcmd without any reason...
|