Arrays must be indexed
#1

I am using Useful Functions include to use the OnPlayerGamble function. but i am getting the following errors.

Код:
C:\Program Files\Rockstar Games\GTA San Andreas (SAMP)\SAMP\pawno\include\uf.inc(4286) : error 033: array must be indexed (variable "betting")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
heres the code im using.

pawn Код:
public OnPlayerGamble(playerid,type,bet,wl)
{
        new PlayerInterior = GetPlayerInterior(playerid);
        if (PlayerInterior == 12)
        {
            SetCameraBehindPlayer(playerid);
            SetPlayerInterior(playerid, 0);
            SetPlayerPos(playerid,1659.4200,2252.7900,11.0701);
            TogglePlayerControllable(playerid,1);
            }
            else if (PlayerInterior == 1)
            {
                SetCameraBehindPlayer(playerid);
                SetPlayerInterior(playerid, 0);
                SetPlayerPos(playerid,2193.6484,1676.5054,12.3672);
                TogglePlayerControllable(playerid,1);
                }
                else if (PlayerInterior == 10)
                {
                    SetCameraBehindPlayer(playerid);
                    SetPlayerInterior(playerid, 0);
                    SetPlayerPos(playerid,2022.6898,1007.0966,10.8203);
                    TogglePlayerControllable(playerid,1);
                }
            }
Reply
#2

anyone?
Reply
#3

Post the error line then we might be able to help you
Reply
#4

ummmm its in my first post, it always was. I believe its a problem with uf.inc
Reply
#5

Didnt notice that it was in an include, Port the include error line
Reply
#6

I have posted the entire include here http://pastebin.ca/1341664

And heres the area where the code is having that above error. The actual line is 4286.
Код:
4285.    #if defined OnPlayerGamble
4286.        if(betting != 0)
4287.        {
4288.           OnPlayerGamble(playerid,betting[playerid],bets[playerid],1);
4289.           betting[playerid] = 0;
4290.           bets[playerid] = 0;
4291.           } 
4292.    #endif
4293.    }
Reply
#7

Try:

Код:
if(betting[playerid] != 0)
Reply
#8

alright thanks ill try, cant try until im home from school :P so i will let you know in about 4 hours.
Reply
#9

Quote:
Originally Posted by =>Sandra<=
Try:

Код:
if(betting[playerid] != 0)
thanks man i got rid of my error!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)