if(!strcmp(cmdtext,"/giveweed",true, 9)) { if(!strlen(cmdtext[9])) return SendClientMessage(playerid, 0xFF0000AA, "USAGE: /giveweed [playerid]"); if(hasweed[playerid] <= 0) return SendClientMessage(playerid,0xFF0000AA,"You don't have any weed to give out!"); new giveid = strval(cmdtext[10]); if(!IsPlayerConnected(giveid)) return SendClientMessage(playerid, 0xFF0000AA, "That player isnt connected"); new string[128], string2[128]; new adminname[MAX_PLAYER_NAME], bringname[MAX_PLAYER_NAME]; GetPlayerName(giveid, givename, sizeof(givename)); GetPlayerName(playerid, adminname, sizeof(adminname)); format(string,sizeof(string),">> You have given %s 1 unit of weed", givename); SendClientMessage(playerid,0xFF8000FF, string); format(string2,sizeof(string2),">> You have received 1 unit of weed from %s ", adminname); SendClientMessage(giveid,0xFF8000FF, string2); GivePlayerMoney(giveid,-1000); GivePlayerMoney(playerid, 1000); hasweed[giveid]++; hasweed[playerid]--; return 1; }
C:\Documents and Settings\Salim\Desktop\SalsTestinGrounds\SalsTestingGrounds.pwn(720) : warning 219: local variable "string" shadows a variable at a preceding level C:\Documents and Settings\Salim\Desktop\SalsTestinGrounds\SalsTestingGrounds.pwn(722) : error 017: undefined symbol "givename" C:\Documents and Settings\Salim\Desktop\SalsTestinGrounds\SalsTestingGrounds.pwn(722) : error 017: undefined symbol "givename" C:\Documents and Settings\Salim\Desktop\SalsTestinGrounds\SalsTestingGrounds.pwn(722) : error 029: invalid expression, assumed zero C:\Documents and Settings\Salim\Desktop\SalsTestinGrounds\SalsTestingGrounds.pwn(722) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
Originally Posted by RKS_
new givename[MAX_PLAYER_NAME];
|
C:\Documents and Settings\Salim\Desktop\SalsTestinGrounds\SalsTestingGrounds.pwn(721) : warning 219: local variable "string" shadows a variable at a preceding level C:\Documents and Settings\Salim\Desktop\SalsTestinGrounds\SalsTestingGrounds.pwn(722) : warning 204: symbol is assigned a value that is never used: "bringname"
new givename[MAX_PLAYER_NAME];
if(!strcmp(cmdtext,"/giveweed",true, 9))
{
new givename[MAX_PLAYER_NAME];
if(!strlen(cmdtext[9])) return SendClientMessage(playerid, 0xFF0000AA, "USAGE: /giveweed [playerid]");
if(hasweed[playerid] <= 0) return SendClientMessage(playerid,0xFF0000AA,"You don't have any weed to give out!");
new giveid = strval(cmdtext[10]);
if(!IsPlayerConnected(giveid)) return SendClientMessage(playerid, 0xFF0000AA, "That player isnt connected");
new string2[128];
new adminname[MAX_PLAYER_NAME];
GetPlayerName(giveid, givename, sizeof(givename));
GetPlayerName(playerid, adminname, sizeof(adminname));
format(string,sizeof(string),">> You have given %s 1 unit of weed", givename);
SendClientMessage(playerid,0xFF8000FF, string);
format(string2,sizeof(string2),">> You have received 1 unit of weed from %s ", adminname);
SendClientMessage(giveid,0xFF8000FF, string2);
GivePlayerMoney(giveid,-1000);
GivePlayerMoney(playerid, 1000);
hasweed[giveid]++;
hasweed[playerid]--;
return 1;
}
new givename[MAX_PLAYER_NAME];
new string[128];
C:\Documents and Settings\Salim\Desktop\SalsTestinGrounds\SalsTestingGrounds.pwn(714) : warning 217: loose indentation C:\Documents and Settings\Salim\Desktop\SalsTestinGrounds\SalsTestingGrounds.pwn(716) : warning 219: local variable "givename" shadows a variable at a preceding level C:\Documents and Settings\Salim\Desktop\SalsTestinGrounds\SalsTestingGrounds.pwn(722) : warning 204: symbol is assigned a value that is never used: "bringname" C:\Documents and Settings\Salim\Desktop\SalsTestinGrounds\SalsTestingGrounds.pwn(722 -- 735) : warning 217: loose indentation C:\Documents and Settings\Salim\Desktop\SalsTestinGrounds\SalsTestingGrounds.pwn(848) : warning 203: symbol is never used: "givename" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Warnings.
if(!strcmp(cmdtext,"/Freeweedforall",true)) { SendClientMessageToAll("Everyone gets some weed for playing on the server, And 30,000"); hasweed[playerid]++; GivePlayerMoney(playerid,25000); return 1; }
Originally Posted by RKS_
loop it....
|