Array must be indexed
#2

Quote:
Originally Posted by Ken97
Посмотреть сообщение
I want to check if the ownersname currently connected is = to the vehicle data's owner
the problem is it's sending an error:
1. Array must be indexed(Variablewnername)
2. Empty Statement




Being a noob an' all, I do not know how to compare two strings if they're the same,
I could use strcmp but I'm still stucked like one happened up top.
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new ownername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, ownername, sizeof(ownername));
    if(strcmp(ownername, AVehicleData[vehicleid][Owner], true) == 0)
    {
        new string[128];
        format(string,sizeof(string), "You are the owner of this vehicle");
        SendClientMessage(playerid, 0x0FF0000AA, string);
    }
return 1;
}
Reply


Messages In This Thread
Array must be indexed - by Neil. - 20.01.2013, 09:37
Re: Array must be indexed - by InfiniTy. - 20.01.2013, 09:39
Re: Array must be indexed - by oliverrud - 20.01.2013, 09:48
Re: Array must be indexed - by Neil. - 20.01.2013, 09:52
Re: Array must be indexed - by InfiniTy. - 20.01.2013, 10:03
Re: Array must be indexed - by Neil. - 20.01.2013, 10:14
Re: Array must be indexed - by InfiniTy. - 20.01.2013, 10:24

Forum Jump:


Users browsing this thread: 1 Guest(s)