Array manipulation
#1

Im having problems with enum arrays this is bugs some values of my script.
Ok lets start with enums:

pawn Код:
enum users
{
    Name[MAX_PLAYER_NAME],
}
new playerinfo[MAX_PLAYERS][users];


enum vInfo
{
    Owner[MAX_PLAYER_NAME],
}
new vehicleinfo[MAX_VEHICLES][vInfo];
Ok looks all alright but there is a big problem with advanced structures.

One exemple I want to get a player name from the vehicleinfo Owner

so I do:
pawn Код:
new pid = GetPlayerID(vehicleinfo[vehicleid][Owner]);
pid will be the playerid but it bugs because it returns always the id number 0

so if there are two players it will return always to id 0 and not
the correct vehicle owner.

I hope someone knows how to manages arrays well to help me sort this bug out please.
Reply


Messages In This Thread
Array manipulation ( Fixed thank you to all for the help) - by Hornet600 - 03.04.2011, 15:16
Re: Array manipulation - by iggy1 - 03.04.2011, 15:22
Re: Array manipulation - by Hornet600 - 03.04.2011, 15:23
Re: Array manipulation - by iggy1 - 03.04.2011, 15:24
Re: Array manipulation - by Hornet600 - 03.04.2011, 15:25
Re: Array manipulation - by iggy1 - 03.04.2011, 15:34
Re: Array manipulation - by Hornet600 - 03.04.2011, 15:41
Re: Array manipulation - by iggy1 - 03.04.2011, 15:45
Re: Array manipulation - by Hornet600 - 03.04.2011, 15:50
Re: Array manipulation - by Miguel - 03.04.2011, 15:51

Forum Jump:


Users browsing this thread: 1 Guest(s)