Array must be indexed
#7

Quote:
Originally Posted by Ken97
Посмотреть сообщение
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new ownername[50];
    new player1;
      new owner;
    owner = AVehicleData[vehicleid][Owner];// symbol is assigned a value that is never used: owner
    GetPlayerName(player1, ownername, sizeof(ownername));
    if(!strcmp(owner,ownername , false))//argument type mismatch(argument 1)
    {
        new string[128];
        format(string,sizeof(string), "You are not the owner of this vehicle");
        SendClientMessage(playerid, 0x0FF0000AA, string);
    }
return 1;
}
See errors above
First of all.. why do you keep changing what i've made ? you keep chaging playerid to player1 ? what for ? and [MAX_PLAYER_NAME] to [50] ?
This V compiles fine for me..
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new ownername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, ownername, sizeof(ownername));
    if(!strcmp(ownername,AVehicleData[vehicleid][Owner],false))
    {
        new string[128];
        format(string,sizeof(string), "You are not 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: 2 Guest(s)