Whats wrong here?
#1

public OnPlayerCommandText(playerid, cmdtext[])
{
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new giveplayerid;

if(strcmp(cmdtext, "/givenrg", true) == 0)

LINE 107 new string[256], tmp[256];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /give nrg [id]");
giveplayerid = strval(tmp);
{
if(IsPlayerConnected(giveplayerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "%s(%i) Has get the NRG-500 by the admin!", sendername, playerid);
SendClientMessageToAll(giveplayerid, COLOR_RED, string);
new Floatcx, Floatcy, Floatcz;
GetPlayerePos(giveplayerid,scx, scy, scz);
SetVehiclePos(522,scx+1,scy+1,scz+1);
format(string, sizeof(string), "You have gave NRG-500 to a player%s(%i)", giveplayer, giveplayerid);
SendClientMessage(playerid, COLOR_RED, string);
GivePlayerMoney( playerid, 10000 );
}
else
{
format(string, sizeof(string), "SERVER: %d isn't connected", giveplayerid);
SendClientMessage(playerid, COLOR_WHITE, string);
}



return 1;
}
return 0;
}



D:\New Folder\GTA San Andreas\SAMP\SAMP SERVER\filterscripts\Givenrg.pwn(107) : error 003: declaration of a local variable must appear in a compound block
D:\New Folder\GTA San Andreas\SAMP\SAMP SERVER\filterscripts\Givenrg.pwn(107) : warning 217: loose indentation
D:\New Folder\GTA San Andreas\SAMP\SAMP SERVER\filterscripts\Givenrg.pwn(107) : error 017: undefined symbol "string"
D:\New Folder\GTA San Andreas\SAMP\SAMP SERVER\filterscripts\Givenrg.pwn(107) : warning 215: expression has no effect
D:\New Folder\GTA San Andreas\SAMP\SAMP SERVER\filterscripts\Givenrg.pwn(107) : error 001: expected token: ";", but found "]"
D:\New Folder\GTA San Andreas\SAMP\SAMP SERVER\filterscripts\Givenrg.pwn(107) : fatal error 107: too many error messages on one line
Reply


Messages In This Thread
Whats wrong here? - by Frankox - 09.07.2009, 08:15
Re: Whats wrong here? - by ledzep - 09.07.2009, 08:16
Re: Whats wrong here? - by Frankox - 09.07.2009, 08:30
Re: Whats wrong here? - by Frankox - 09.07.2009, 08:33
Re: Whats wrong here? - by ledzep - 09.07.2009, 08:35
Re: Whats wrong here? - by Frankox - 09.07.2009, 08:41
Re: Whats wrong here? - by ledzep - 09.07.2009, 08:46
Re: Whats wrong here? - by Frankox - 09.07.2009, 09:04
Re: Whats wrong here? - by Frankox - 09.07.2009, 09:09
Re: Whats wrong here? - by Frankox - 09.07.2009, 09:11

Forum Jump:


Users browsing this thread: 2 Guest(s)