enum / variable problem
#1

Hi... I'm making a vehicle system and I don't want to do it for each player again, therefore I used some enums...
like
Examplename[amountofvehicleslots]...

and now I got a little problem...
Код:
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));

if(listitem == 0){
 SetVehicleToRespawn(PrivateVehs[name][0]);
}
(that's at OnDialogResponse)...
it should respawn the first vehicle of the player that choose the function... but I get this error at the "SetVehicleToRespawn" line:
Код:
error 033: array must be indexed (variable "pname")
I guess because there is no "pname" defined in the PrivateVehs enum...
so how can I make it work?
Reply


Messages In This Thread
enum / variable problem - by Sascha - 20.10.2010, 00:49
Re: enum / variable problem - by Cameltoe - 20.10.2010, 01:12
Re: enum / variable problem - by Sascha - 20.10.2010, 08:24
Re: enum / variable problem - by Cameltoe - 20.10.2010, 11:59
Re: enum / variable problem - by Sascha - 20.10.2010, 12:36
Re: enum / variable problem - by Cameltoe - 20.10.2010, 12:40
Re: enum / variable problem - by Sascha - 20.10.2010, 12:46

Forum Jump:


Users browsing this thread: 3 Guest(s)