Enter / Exit
#10

Quote:
Originally Posted by [ABK]Antonio
Посмотреть сообщение
In PAWN you can have variables as cases.

pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid) //don't know why you would use a command to enter pickups
{
    switch(pickupid)
    {
        case arrowpickup[1]:
        {
            //do stuff
        }
        case arrowpickup[2]:
        {
            //do stuff
        }
    }
}
I get two errors regarding the two cases themselves.

pawn Код:
C:\Users\Ben\Desktop\SF-RP\gamemodes\bensamp.pwn(542) : error 008: must be a constant expression; assumed zero
C:\Users\Ben\Desktop\SF-RP\gamemodes\bensamp.pwn(546) : error 008: must be a constant expression; assumed zero
Not to sure what the error is either.
Reply


Messages In This Thread
Enter / Exit - by vIBIENNYx - 23.05.2012, 00:38
Re: Enter / Exit - by ReneG - 23.05.2012, 01:03
Re: Enter / Exit - by vIBIENNYx - 23.05.2012, 01:42
Re: Enter / Exit - by Jonny5 - 23.05.2012, 01:45
Re: Enter / Exit - by vIBIENNYx - 23.05.2012, 01:48
Re: Enter / Exit - by Jonny5 - 23.05.2012, 01:49
Re: Enter / Exit - by vIBIENNYx - 23.05.2012, 01:52
Re: Enter / Exit - by SuperViper - 23.05.2012, 02:53
Re: Enter / Exit - by [ABK]Antonio - 23.05.2012, 06:44
Re: Enter / Exit - by vIBIENNYx - 23.05.2012, 13:08

Forum Jump:


Users browsing this thread: 5 Guest(s)