Array must be indexed?
#1

Hi all - A long time since ive needed help but here it goes...

im having a problem with the following code:
pawn Код:
new pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
    if(pName == "Ash") //On this line is the error.
    {
        printf("GetPlayerMoney: %i", GetPlayerMoney(playerid));
        printf("AntiCheatMoney[myid]: %i", AntiCheatMoney[playerid]); //I have AntiCheatMoney earlier in the script.
    }
It says pName needs indexing. But im using it as a string variable?

RESOLVED

Can anyone else see the problem?
Reply
#2

Just realised i failed and i can use strcmp xD - Thanks Anyway
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)