#include <a_samp> new cmd[128]; new tmp[128]; new idx; new giveplayername[MAX_PLAYER_NAME]; new sendername[MAX_PLAYER_NAME]; new string[128]; == > line 9 cmd = strtok(cmd,idx); #define POLICE 1 #define ARMY 2 #define FBI 3 forward IsPlayerInPolice(playerid); forward IsPlayerInArmy(playerid); forward IsPlayerInFbi(playerid);
C:\Documents and Settings\Administrator\Desktop\Jub commands.pwn(9) : error 010: invalid function or declaration
#include <a_samp> #define POLICE 1 #define ARMY 2 #define FBI 3 forward IsPlayerInPolice(playerid); forward IsPlayerInArmy(playerid); forward IsPlayerInFbi(playerid); public OnPlayerCommandText(playerid, cmdtext[]) { new cmd[128]; new tmp[128]; new idx; new giveplayername[MAX_PLAYER_NAME]; new sendername[MAX_PLAYER_NAME]; new string[128]; cmd = strtok(cmd,idx); { if(strcmp("/command", cmdtext, true, 7) == 0) { return 1; } return 0; }
C:\Documents and Settings\Administrator\Desktop\Jub commands.pwn(23) : error 017: undefined symbol "strtok" C:\Documents and Settings\Administrator\Desktop\Jub commands.pwn(23) : error 033: array must be indexed (variable "cmd") C:\Documents and Settings\Administrator\Desktop\Jub commands.pwn(33) : error 030: compound statement not closed at the end of file (started at line 17)
#include <a_samp>
#define POLICE 1
#define ARMY 2
#define FBI 3
forward IsPlayerInPolice(playerid);
forward IsPlayerInArmy(playerid);
forward IsPlayerInFbi(playerid);
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[128];
new tmp[128];
new idx;
new giveplayername[MAX_PLAYER_NAME];
new sendername[MAX_PLAYER_NAME];
new string[128];
cmd = strtok(cmd,idx);
if(strcmp("/command", cmdtext, true, 8) == 0)
{
return 1;
}
return 0;
}
C:\Documents and Settings\Administrator\Desktop\Jub commands.pwn(19) : error 017: undefined symbol "strtok" C:\Documents and Settings\Administrator\Desktop\Jub commands.pwn(19) : error 033: array must be indexed (variable "cmd") C:\Documents and Settings\Administrator\Desktop\Jub commands.pwn(18) : warning 204: symbol is assigned a value that is never used: "string" C:\Documents and Settings\Administrator\Desktop\Jub commands.pwn(17) : warning 204: symbol is assigned a value that is never used: "sendername" C:\Documents and Settings\Administrator\Desktop\Jub commands.pwn(16) : warning 204: symbol is assigned a value that is never used: "giveplayername" C:\Documents and Settings\Administrator\Desktop\Jub commands.pwn(15) : warning 203: symbol is never used: "idx" C:\Documents and Settings\Administrator\Desktop\Jub commands.pwn(14) : warning 204: symbol is assigned a value that is never used: "tmp" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.
Originally Posted by Don Correlli
And make sure you have the "strtok" function (i don't see it in the code you gave).
|