new cmd[256]; new idx; cmd = strtok(cmdtext, idx); if(!strcmp(cmd,"/darnivel",true)) { new tmp[128]; tmp = strtok(cmdtext,idx); new giveplayerid; if(!strlen(tmp)) { SendClientMessage(playerid,0xFFFFFFAA,"USE: /darnivel [id]"); return 1; } giveplayerid = strval(tmp); if(IsPlayerAdmin(playerid)) { if(IsPlayerConnected(giveplayerid)) { SetPlayerScore(playerid,GetPlayerScore(playerid)++); SendClientMessage(playerid,0xFFFFFFAA,"Vocк recebeu mais um nнvel de um administrador!"); } else SendClientMessage(playerid,0xFFFFFFAA,"O player estб inativo!"); } else SendClientMessage(playerid,0xFFFFFFAA,"Vocк nгo estб logado na RCON!"); return 1; }
D:\Meu Server SA-MP\server 0.3\filterscripts\teste.pwn(7) : error 017: undefined symbol "strtok"
D:\Meu Server SA-MP\server 0.3\filterscripts\teste.pwn(7) : error 033: array must be indexed (variable "cmd")
D:\Meu Server SA-MP\server 0.3\filterscripts\teste.pwn(11) : error 017: undefined symbol "strtok"
D:\Meu Server SA-MP\server 0.3\filterscripts\teste.pwn(11) : error 033: array must be indexed (variable "tmp")
D:\Meu Server SA-MP\server 0.3\filterscripts\teste.pwn(6) : warning 203: symbol is never used: "idx"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
Originally Posted by LuCaS_
pawn Code:
http://forum.sa-mp.com/index.php?topic=132830.0 e coloque no seu mode e substitua o "strtok" por psf_strtok. e ele tem varias funзхes de string que podem ser bastante ъtil para vocк ![]() |
new cmd[64]; new idx; cmd = strtok(cmdtext, idx); if(!strcmp(cmd,"/darnivel",true)) { new tmp[128]; tmp = strtok(cmdtext,idx); new giveplayerid; if(!strlen(tmp)) { SendClientMessage(playerid,0xFFFFFFAA,"USE: /darnivel [id]"); return 1; } giveplayerid = strval(tmp); if(IsPlayerAdmin(playerid)) { if(IsPlayerConnected(giveplayerid)) { SetPlayerScore(playerid, GetPlayerScore(giveplayerid) ++); SendClientMessage(playerid, 0xFFFFFFAA, "Vocк recebeu mais um nнvel de um administrador."); } else { SendClientMessage(playerid, 0xFFFFFFAA, "O player nгo estб conectado."); } } else { SendClientMessage(playerid, 0xFFFFFFAA, "Vocк nгo estб logado na RCON."); } return 1; }