09.07.2010, 16:06
Well I have this:
It gives 2 errors :P
I don't think it is good either
I;m new to these things though
Код:
if(strcmp(cmd,"/spg", true) == 0) { new gangrank = strval(tmp3); tmp = strtok(cmdtext, idx); if(!strlen(tmp2))return SendClientMessage(playerid, COLOR_GRIJS, "TIP: Type /spg [playerid] [gang] [rank]"); giveplayerid = strval(tmp); if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid,COLOR_VELROOD,"*This ID is not connected*"); tmp2 = strtok(cmdtext, idx); if(!strlen(tmp2))return SendClientMessage(playerid, COLOR_GRIJS, "TIP: Type /spg [playerid] [gang] [rank]"); tmp3 = strtok(cmdtext, idx); if(!strlen(tmp2))return SendClientMessage(playerid, COLOR_GRIJS, "TIP: Type /spg [playerid] [gang] [rank]"); if(adminlevel[playerid] >= 8) { sapd[giveplayerid] = gangrank; grove[giveplayerid] = gangrank; sapd[giveplayerid] = 0; grove[giveplayerid] = 0; if(strval(tmp2) == 1) sapd[giveplayerid] = 1; if(strval(tmp2) == 2) grove[giveplayerid] = 1; if(strval(tmp2) == 99) grove[giveplayerid] = 0; } else { SendClientMessage(playerid,COLOR_GRIJS,"You're not allowed to use this command"); } return 1; }
Код:
C:\Users\Bart\Desktop\Sa-mp\gamemodes\NightLife.pwn(394) : error 017: undefined symbol "tmp3" C:\Users\Bart\Desktop\Sa-mp\gamemodes\NightLife.pwn(405) : error 017: undefined symbol "tmp3" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.
I;m new to these things though