weird problem - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: weird problem (
/showthread.php?tid=189927)
weird problem -
armyoftwo - 13.11.2010
pawn Код:
CMD:dropweapon(playerid)
{
new gunID = GetPlayerWeapon(playerid);
new gunAmmo = GetPlayerAmmo(playerid);
new WID;
if(gunID != 0 && gunAmmo != 0)
{
format(string, sizeof(string), "%s trows his %s away", AccountData[playerid][PlayerName], GetPlayerWeaponName(gunID));
SendLocalMessage(playerid, string, 20.0, COLOR_ME, COLOR_ME);
RemovePlayerWeapon(playerid, gunID);
Itter_Add(Weapons,Iter_Count(Weapons)+1);
GetPlayerPos(playerid, WeaponInfo[Iter_Count(Weapons)][wPos][0], WeaponInfo[Iter_Count(Weapons)][wPos][1], WeaponInfo[Iter_Count(Weapons)][wPos][2]); // ERROR!!
WeaponInfo[Iter_Count(Weapons)][wObject] = GunObjects[gunID][0];
WID = CreateObject(WeaponInfo[Iter_Count(Weapons)][wPos][0], WeaponInfo[Iter_Count(Weapons)][wPos][1], WeaponInfo[Iter_Count(Weapons)][wPos][2]-1,93.7,120.0,120.0);
WeaponInfo[Iter_Count(Weapons)][wObjectID] = WID;
return 1;
}
return 1;
}
I have a "weird error" in there, maybe it's not weird because i haven't noticed something.
Error line has been COMMENTED
Код:
C:\Users\D\Desktop\samp03bsvr_win32\gamemodes\GSRP.pwn(5310) : error 001: expected token: ",", but found "["
C:\Users\D\Desktop\samp03bsvr_win32\gamemodes\GSRP.pwn(5310) : error 029: invalid expression, assumed zero
C:\Users\D\Desktop\samp03bsvr_win32\gamemodes\GSRP.pwn(5310) : warning 215: expression has no effect
C:\Users\D\Desktop\samp03bsvr_win32\gamemodes\GSRP.pwn(5310) : error 001: expected token: ";", but found "]"
C:\Users\D\Desktop\samp03bsvr_win32\gamemodes\GSRP.pwn(5310) : fatal error 107: too many error messages on one line
I cant find the place where the error is occurring
it's on this line
Код:
GetPlayerPos(playerid, WeaponInfo[Iter_Count(Weapons)][wPos][0], WeaponInfo[Iter_Count(Weapons)][wPos][1], WeaponInfo[Iter_Count(Weapons)][wPos][2]); // ERROR!!
EDIT: made a stupid error

solved