C:\Documents and Settings\Administrator\Mijn documenten\SAMP Server\gamemodes\SWAT.pwn(889) : error 017: undefined symbol "strtok" C:\Documents and Settings\Administrator\Mijn documenten\SAMP Server\gamemodes\SWAT.pwn(889) : error 033: array must be indexed (variable "cmd") C:\Documents and Settings\Administrator\Mijn documenten\SAMP Server\gamemodes\SWAT.pwn(890) : error 017: undefined symbol "strtok" C:\Documents and Settings\Administrator\Mijn documenten\SAMP Server\gamemodes\SWAT.pwn(890) : error 033: array must be indexed (variable "tmp") C:\Documents and Settings\Administrator\Mijn documenten\SAMP Server\gamemodes\SWAT.pwn(891) : error 001: expected token: ")", but found "return" C:\Documents and Settings\Administrator\Mijn documenten\SAMP Server\gamemodes\SWAT.pwn(893) : error 001: expected token: ";", but found "if" C:\Documents and Settings\Administrator\Mijn documenten\SAMP Server\gamemodes\SWAT.pwn(897) : error 017: undefined symbol "giveplayer" C:\Documents and Settings\Administrator\Mijn documenten\SAMP Server\gamemodes\SWAT.pwn(897) : error 017: undefined symbol "giveplayer" C:\Documents and Settings\Administrator\Mijn documenten\SAMP Server\gamemodes\SWAT.pwn(899) : error 001: expected token: ",", but found ";" C:\Documents and Settings\Administrator\Mijn documenten\SAMP Server\gamemodes\SWAT.pwn(1041) : warning 203: symbol is never used: "giveplayername" C:\Documents and Settings\Administrator\Mijn documenten\SAMP Server\gamemodes\SWAT.pwn(1041) : warning 203: symbol is never used: "idx" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 9 Errors.
(THESE ARE AT TOP OF SCRIPT) 29 new tmp[128]; 30 new idx; 31 new giveplayerid; 32 new giveplayername[MAX_PLAYER_NAME]; 33 new sendername[MAX_PLAYER_NAME]; 886 new cmd[30]; 887 if(strcmp(cmd, "/cuff", true) == 0) 888 { 889 cmd = strtok(cmdtext, idx); 890 tmp = strtok(cmdtext,idx); 891 if(!strlen(tmp) return SendClientMessage(playerid, white, "USAGE: /cuff playerid"); 892 giveplayerid = strval(tmp) 893 if(gTeam[playerid] == TEAM_SWAT) 894 { 895 if(gTeam[giveplayerid] == TEAM_SWAT) return SendClientMessage(playerid,white, "You can not cuff cops or SWAT."); 896 TogglePlayerControllable(giveplayerid,0); 897 format(tmp, sizeof(tmp),"You have cuffed %s", GetPlayerName(giveplayerid,giveplayer,sizeof(giveplayer)); 898 SendClientMessage(playerid,blue,tmp); 899 format(tmp, sizeof(tmp),"You have been cuffed by %s", GetPlayerName(playerid,sendername,sizeof(sendername)); 900 return 1; 901 } 902 return 1; 903 }
Originally Posted by VonLeeuwen
I'm still a noob, so don't go hard on me
|
strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
C:\Documents and Settings\Administrator\Mijn documenten\SAMP Server\gamemodes\SWAT.pwn(910) : error 001: expected token: ")", but found "return" C:\Documents and Settings\Administrator\Mijn documenten\SAMP Server\gamemodes\SWAT.pwn(912) : error 001: expected token: ";", but found "if" C:\Documents and Settings\Administrator\Mijn documenten\SAMP Server\gamemodes\SWAT.pwn(916) : error 017: undefined symbol "giveplayer" C:\Documents and Settings\Administrator\Mijn documenten\SAMP Server\gamemodes\SWAT.pwn(916) : error 017: undefined symbol "giveplayer" C:\Documents and Settings\Administrator\Mijn documenten\SAMP Server\gamemodes\SWAT.pwn(918) : error 001: expected token: ",", but found ";" C:\Documents and Settings\Administrator\Mijn documenten\SAMP Server\gamemodes\SWAT.pwn(1060) : warning 203: symbol is never used: "giveplayername" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.
Originally Posted by VonLeeuwen
Now I still have these:
Код:
C:\Documents and Settings\Administrator\Mijn documenten\SAMP Server\gamemodes\SWAT.pwn(910) : error 001: expected token: ")", but found "return" C:\Documents and Settings\Administrator\Mijn documenten\SAMP Server\gamemodes\SWAT.pwn(912) : error 001: expected token: ";", but found "if" C:\Documents and Settings\Administrator\Mijn documenten\SAMP Server\gamemodes\SWAT.pwn(916) : error 017: undefined symbol "giveplayer" C:\Documents and Settings\Administrator\Mijn documenten\SAMP Server\gamemodes\SWAT.pwn(916) : error 017: undefined symbol "giveplayer" C:\Documents and Settings\Administrator\Mijn documenten\SAMP Server\gamemodes\SWAT.pwn(918) : error 001: expected token: ",", but found ";" C:\Documents and Settings\Administrator\Mijn documenten\SAMP Server\gamemodes\SWAT.pwn(1060) : warning 203: symbol is never used: "giveplayername" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors. |