SA-MP Forums Archive
WTF is wrong :/ }:( - 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: WTF is wrong :/ }:( (/showthread.php?tid=252807)



[FIXED] WTF is wrong :/ }:( - anant - 03.05.2011

Код:
Current directory: D:\VERY IMPORTANT STUFF\SA-MP Scripts\EL-RP\gamemodes
el-rp.pwn(50572) : error 001: expected token: ";", but found "}"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
================ READY ================
UNDER OnPlayerPickupPickup
pawn Код:
//Look :(
    else if(pickupid == iAmmu1 && iAmmu2 && iAmmu3 && iAmmu4 && iAmmu5)
    {
        GameTextForPlayer(playerid, "~w~Use ~r~/buygun ~w~to buy ~n~ ~r~firearms.", 5000, 3);
/*This is the error line*/      return 1;
    }
Edit :
Fixed lawl, I just hitted compile again and voila, but I still wonder why it happened when the code was right.


Re: WTF is wrong :/ }:( - Backwardsman97 - 03.05.2011

I don't think that this is the correct syntax.

pawn Код:
if(pickupid == iAmmu1 && iAmmu2 && iAmmu3 && iAmmu4 && iAmmu5)
I may be wrong.


Re: WTF is wrong :/ }:( - park4bmx - 03.05.2011

is like this
pawn Код:
if(pickupid == iAmmu1 && pickupid == iAmmu2 && pickupid == iAmmu3 && pickupid == iAmmu4 && pickupid == iAmmu5)



Re: WTF is wrong :/ }:( - Backwardsman97 - 03.05.2011

Yeah. I don't think the code in the first post will work.


Re: WTF is wrong :/ }:( - Riddick94 - 03.05.2011

But you can't pick up at one time five pickups at once! It's impossible to do. You must change "&&" on "||".


Re: WTF is wrong :/ }:( - park4bmx - 03.05.2011

Quote:
Originally Posted by Riddick94
Посмотреть сообщение
But you can't pick up at one time five pickups at once! It's impossible to do. You must change "&&" on "||".
True that's what I was thinking.


Re: WTF is wrong :/ }:( - [SFA]SpiRRiT - 03.05.2011

Remember this,

Next time make a decent thread subject.. NEVER use 'WTF' in a thread subject..
If following thread subject contains the word 'WTF', there will be consequences.

Take care.