SA-MP Forums Archive
error 006. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: error 006. (/showthread.php?tid=427293)



error 006. - The__ - 01.04.2013

Quote:
Originally Posted by Script
gamemodes\X.pwn(34911) : error 006: must be assigned to an array
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
pawn Код:
else if(strcmp(x_job,"register",true) == 0)
{
    new platenumber[16], strings[64], key;
    if (!IsPlayerInAnyVehicle(playerid)) {
        SendClientMessage(playerid,COLOR_GREY,"You must be inside your vehicle !");
        return 1;
    }
    if(PlayerInfo[playerid][pCarkey] == VehicleOwned[idcar]) { key = PlayerInfo[playerid][pCarkey]; }
    else if(PlayerInfo[playerid][pCarkey2] == VehicleOwned[idcar]) { key = PlayerInfo[playerid][pCarkey2]; }
    else if(PlayerInfo[playerid][pCarkey3] == VehicleOwned[idcar]) { key = PlayerInfo[playerid][pCarkey3]; }
    else { return 1; }
    format(platenumber,128,"*%d%d%d%d*",random(9),random(9),random(9),random(9));
    SetVehicleNumberPlate(idcar, platenumber);
    CarInfo[VehicleOwned[key]][cLicense] = platenumber;
    format(strings,sizeof(strings),"{00C0FF}You've changed your registration plate to: %d, it'll change when you will re-spawn your vehicle.",platenumber);
    SendClientMessage(playerid, COLOR_LIGHTRED, strings);
    PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
    SaveCars();
}
pawn Код:
CarInfo[VehicleOwned[key]][cLicense] = platenumber;



Re: error 006. - RajatPawar - 01.04.2013

Highlight the line please. Also, another tip:
pawn Код:
else { SendClientMessage (..); return 1; }
// Instead, just do
else return SendClientMessage (..);
Just something, it doesn't make a difference.


Re: error 006. - The__ - 01.04.2013

Done.


Re : error 006. - The__ - 03.04.2013

Bump