07.11.2012, 11:13
I am having problems trying to compare a string (in variable format) with a stored variable.
Here is my code:
The error I get is about comparisson to an array.
I have tried this too:
Suggestions are welcome
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 }
I have tried this too:
Код:
GetPlayerName(playerid, pName, MAX_PLAYER_NAME) if(VehicleCheck[vehicleid][STRINGVARIABLE] == pName){