Enums and Strings
#1

I am having problems trying to compare a string (in variable format) with a stored variable.

Here is my code:


Код:
enum STUFF{
STRINGVARIABLE[MAX_PLAYER_NAME]
};

new VehicleCheck[MAX_VEHICLES][STUFF];
new pName[MAX_PLAYER_NAME];

//this is in a public call which includes vehicleid and playerid
VehicleCheck[vehicleid][STRINGVARIABLE] = GetPlayerName(playerid, pName, MAX_PLAYER_NAME);


//this is in a different public call which includes vehicleid and playerid
if(VehicleCheck[vehicleid][STRINGVARIABLE] == GetPlayerName(playerid, pName, MAX_PLAYER_NAME)){
 //do stuff
}
The error I get is about comparisson to an array.

I have tried this too:
Код:
GetPlayerName(playerid, pName, MAX_PLAYER_NAME)
if(VehicleCheck[vehicleid][STRINGVARIABLE] == pName){
Suggestions are welcome
Reply


Messages In This Thread
Enums and Strings - by adsy - 07.11.2012, 11:13
Re: Enums and Strings - by cosbraa - 07.11.2012, 11:25
Re: Enums and Strings - by PrawkC - 07.11.2012, 11:56
Re: Enums and Strings - by adsy - 07.11.2012, 11:59
Re: Enums and Strings - by cosbraa - 07.11.2012, 12:01

Forum Jump:


Users browsing this thread: 1 Guest(s)