Array must be indexed
#5

Quote:
Originally Posted by Ken97
Посмотреть сообщение
Still the same error :/





pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new ownername[50];
    new player1;
    new owner = AVehicleData[vehicleid][Owner];
    GetPlayerName(player1, ownername, sizeof(ownername));
    if(!strcmp(owner, "", true)) // I can't put ownername on the ""
    {
        new string[128];
        format(string,sizeof(string), "You are not the owner of this vehicle");
        SendClientMessage(playerid, 0x0FF0000AA, string);
    }
return 1;
}
this code, does not give errors, but i'm just stuck on what to put between ""
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new ownername[MAX_PLAYER_NAME];
    new owner = AVehicleData[vehicleid][Owner];
    GetPlayerName(playerid, ownername, sizeof(ownername));
    if(!strcmp(owner, owername, true)) // I can't put ownername on the ""
    {
        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)