/minigun changed tryd sscanf2 but i getting errors?? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /minigun changed tryd sscanf2 but i getting errors?? (
/showthread.php?tid=398983)
/minigun changed tryd sscanf2 but i getting errors?? -
Mustafa6155 - 12.12.2012
pawn Код:
CMD:minigun(playerid, params[])
{
if (PlayerInfo[playerid][pAdmin] >= 3) //getting player status
{
new pname[MAX_PLAYER_NAME],string[128],id;
if(sscanf(params,"u",id)) SendClientMessage(playerid, 0xAA3333AA, "[GEBRUIK] /minigun [ID]"); //minigun with id
{
else //error
}
if(!IsPlayerConnected(id)) SendClientMessage(playerid, 0xAA3333AA, "Player/ID is niet online."); //player/id isnt online
{
else //error
}
GivePlayerWeapon(playerid, 38, 20000);
format(string,sizeof(string),"Admin %s(%d) heeft een minigun gespawnt!",pname,playerid); //Admin my name(id) spawned an Minigun
SendClientMessage(playerid, 0xAA333AA, string);//^^
{
else //error line
}
SendClientMessage(playerid, -1,"{F81414}Je bent geen Admin!"); //you arnt an admin!
}
return 1;
}
Its in dutch but changed it
my error searched but could find it.
Код:
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\TDMNIEUW.pwn(636) : error 029: invalid expression, assumed zero
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\TDMNIEUW.pwn(640) : error 029: invalid expression, assumed zero
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\TDMNIEUW.pwn(646) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.
Thanks, sorry for m bad English.
Re: /minigun changed tryd sscanf2 but i getting errors?? -
JaKe Elite - 12.12.2012
pawn Код:
CMD:minigun(playerid, params[])
{
if (PlayerInfo[playerid][pAdmin] >= 3) //getting player status
{
new pname[MAX_PLAYER_NAME],string[128],id;
if(sscanf(params,"u",id)) return SendClientMessage(playerid, 0xAA3333AA, "[GEBRUIK] /minigun [ID]"); //minigun with id
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xAA3333AA, "Player/ID is niet online."); //player/id isnt online
GivePlayerWeapon(playerid, 38, 20000);
format(string,sizeof(string),"Admin %s(%d) heeft een minigun gespawnt!",pname,playerid); //Admin my name(id) spawned an Minigun
SendClientMessage(playerid, 0xAA333AA, string);//^^
}
else return SendClientMessage(playerid, -1,"{F81414}Je bent geen Admin!"); //you arnt an admin!
return 1;
}
Re: /minigun changed tryd sscanf2 but i getting errors?? -
Mustafa6155 - 12.12.2012
Thank you Romel i seed that { } must be change one and else thank you so much.