Posts: 152
Threads: 24
Joined: Aug 2014
Reputation:
0
I want to make LandInfo[land][landOwner] = to GetPlayerNameEX how can i do it. when i type : if(LandInfo[land][landOwner] = GetPlayerName(playerid))
i get error : array must be indexed any help?
Posts: 579
Threads: 5
Joined: Oct 2015
You can't use '==' in strings, use strcmp.
PHP код:
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
if(!strcmp(LandInfo[land][landOwner], pName))
{
// player names matches.
}
and your LandOwner variable should be like that
PHP код:
LandOwner[MAX_PLAYER_NAME]
Posts: 152
Threads: 24
Joined: Aug 2014
Reputation:
0
my [landOwner] is in enum.....
Posts: 579
Threads: 5
Joined: Oct 2015
Yes @Alpha000, It will work.