Array Problem?
#1

I don't understand what i have to do here.

Код:
new VehicleOwner[MAX_OWNEDVEHICLES][MAX_PLAYER_NAME];

cmd(test, playerid, params[])
{
    for(new i=0; i < MAX_OWNEDVEHICLES; i++)
    {
        if(VehicleOwner[i] == PlayerName(playerid)) // This is the error line
	{
            // ...
	}
    }
}

error 033: array must be indexed (variable "VehicleOwner")
Код:
// And if i try this i get another error
if(VehicleOwner[i][MAX_PLAYER_NAME] == PlayerName(playerid))
 
error 032: array index out of bounds (variable "VehicleOwner")
Reply


Messages In This Thread
Array Problem? - by Yuup - 23.05.2013, 16:57
Re: Array Problem? - by Swimor - 23.05.2013, 17:11
Re: Array Problem? - by Yuup - 23.05.2013, 17:14

Forum Jump:


Users browsing this thread: 2 Guest(s)