Engine system errors.
#1

Hello, I am getting this error with my engine system. I'm editing a PenLS Edit, which use SetVehicleParamsForPlayer, I'm trying to convert it to SetVehicleParamsEx.

Код:
C:\Users\sean mcelholm\Desktop\SAN-RP Scripting - PRIVATE\gamemodes\PS-RP.pwn(4884) : error 035: argument type mismatch (argument 2)
C:\Users\sean mcelholm\Desktop\SAN-RP Scripting - PRIVATE\gamemodes\PS-RP.pwn(4874) : warning 203: symbol is never used: "engine"
C:\Users\sean mcelholm\Desktop\SAN-RP Scripting - PRIVATE\gamemodes\PS-RP.pwn(13415) : warning 217: loose indentation
C:\Users\sean mcelholm\Desktop\SAN-RP Scripting - PRIVATE\gamemodes\PS-RP.pwn(26115) : error 035: argument type mismatch (argument 4)
C:\Users\sean mcelholm\Desktop\SAN-RP Scripting - PRIVATE\gamemodes\PS-RP.pwn(26103) : warning 203: symbol is never used: "alarm"
C:\Users\sean mcelholm\Desktop\SAN-RP Scripting - PRIVATE\gamemodes\PS-RP.pwn(26727) : warning 203: symbol is never used: "alarm"
C:\Users\sean mcelholm\Desktop\SAN-RP Scripting - PRIVATE\gamemodes\PS-RP.pwn(34092) : error 035: argument type mismatch (argument 2)
C:\Users\sean mcelholm\Desktop\SAN-RP Scripting - PRIVATE\gamemodes\PS-RP.pwn(34099) : error 035: argument type mismatch (argument 2)
C:\Users\sean mcelholm\Desktop\SAN-RP Scripting - PRIVATE\gamemodes\PS-RP.pwn(34108) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
pawn Код:
if(strcmp(cmd, "/engine", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            new engine,lights,alarm,doors,bonnet,boot,objective;
            GetVehicleParamsEx(idcar,engine,lights,alarm,doors,bonnet,boot,objective);
            if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
            {
                SendClientMessage(playerid,COLOR_GREY," You are not even inside a vehicle!");
                return 1;
            }
            if (IsNotAEngineCar(idcar))
            {
                SendClientMessage(playerid,COLOR_GREY," This vehicle dosent even have a Engine!");
                return 1;
            }
            if(IsAnOwnableCar(idcar))
            {
                if(PlayerInfo[playerid][pCarkey] == VehicleOwned[idcar]) { }
                else if(PlayerInfo[playerid][pCarkey2] == VehicleOwned[idcar]) { }
                else if(PlayerInfo[playerid][pCarkey3] == VehicleOwned[idcar]) { }
                else { return 1; }
            }
            if(ReduceTime[playerid] > 0)
            {
                format(string, sizeof(string), " You need to wait %d seconds to type this command.", ReduceTime[playerid]);
                SendClientMessage(playerid, COLOR_GREY, string);
                return 1;
            }
            GetPlayerName(playerid, sendername, sizeof(sendername));
            GiveNameSpace(sendername);
            if(PlayerInfo[playerid][pMaskUse] == 1) { format(sendername, sizeof(sendername), "[Mask_%d]", RandMask[playerid]); }
            if (VehicleEngine[idcar] == 0)
            {
                new RandomStart;
                RandomStart = random(4);
                switch(RandomStart)
                {
                    case 0,1,2:
                    {
                        if(VehAsk[playerid] == 1)
                        {
                            VehAsk[playerid] = 0;
                        }
                        SetVehicleParamaters(idcar,true,lights,alarm,doors,bonnet,boot,objective);
                        VehicleEngine[idcar] = 1;
                        format(string, sizeof(string), "* %s starts the engine of the %s.", sendername, VehicleName[GetVehicleModel(idcar)-400]);
                        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    }
                    case 3:
                    {
                        SetVehicleParamaters(idcar,false,lights,alarm,doors,bonnet,boot,objective);
                        format(string, sizeof(string), "* %s engine does not start ((%s))", VehicleName[GetVehicleModel(idcar)-400], sendername);
                        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                        ReduceTime[playerid] = 3;
                    }
                }
            }
            else if (VehicleEngine[idcar] == 1)
            {
                SetVehicleParamaters(idcar,false,lights,alarm,doors,bonnet,boot,objective);
                VehicleEngine[idcar] = 0;
                format(string, sizeof(string), "* %s spins the %s's key into the ignition and turns the engine off.", sendername, VehicleName[GetVehicleModel(idcar)-400]);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                VehAsk[playerid] = 1;
            }
        }
        return 1;
    }
pawn Код:
if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
        {
            new idcar = GetPlayerVehicleID(i);
            new string[128];
            new sendername[MAX_PLAYER_NAME];
            if(IsAnOwnableCar(idcar))
            {
                if(HotWire[i] == 1 && HotWireTime[i] > 0)
                {
                    HotWireTime[i] --;
                    format(string, sizeof(string), "%d", HotWireTime[i]);
                    GameTextForPlayer(i, string, 4000, 3);
                }
                else if(HotWire[i] == 1 && HotWireTime[i] == 0)
                {
                    HotWire[i] = 0;
                    new engine,lights,alarm,doors,bonnet,boot,objective;
                    new RandomStart;
                    RandomStart = random(4);
                    GetPlayerName(i, sendername, sizeof(sendername));
                    GiveNameSpace(sendername);
                    if(PlayerInfo[i][pMaskUse] == 1) { format(sendername, sizeof(sendername), "[Mask_%d]", RandMask[i]); }
                    switch(RandomStart)
                    {
                        case 0,1,2:
                        {
                            SetVehicleParamaters(GetPlayerVehicleID(i),1,lights,alarm,doors,bonnet,boot,objective);
                            VehAsk[i] = 0;
                            VehicleEngine[GetPlayerVehicleID(i)] = 1;
                            TogglePlayerControllable(i,true);
                            format(string, sizeof(string), "* Vehicle hotwired ((%s))", sendername);
                            ProxDetector(30.0, i, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                        }
                        case 3:
                        {
                            SendClientMessage(i,COLOR_LIGHTRED,"Vehicle did not hotwire.");
                            format(string, sizeof(string), "* Vehicle did not hotwire ((%s))", sendername);
                            ProxDetector(30.0, i, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                        }
                    }
                }
            }
        }
pawn Код:
if(strcmp(cmd, "/hotwire", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            new engine,lights,alarm,doors,bonnet,boot,objective;
            if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
            {
                if(VehAsk[playerid] == 2 && HotWire[playerid] == 0)
                {
                    GetPlayerName(playerid, sendername, sizeof(sendername));
                    GiveNameSpace(sendername);
                    if(PlayerInfo[playerid][pMaskUse] == 1) { format(sendername, sizeof(sendername), "[Mask_%d]", RandMask[playerid]); }
                    format(string, sizeof(string), "* %s rips the wires out of the ignition and attempts to hotwire the vehicle.", sendername);
                    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    format(string, sizeof(string), "* *BEEP* *BEEP* *BEEP* (( Car Alarm ))");
                    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    SetVehicleParamaters(idcar,engine,lights,1,doors,bonnet,boot,objective);
                    HotWire[playerid] = 1;
                    if(CarInfo[VehicleOwned[idcar]][cAlarm] == 1)
                    {
                        HotWireTime[playerid] = 60;
                    }
                    else if(CarInfo[VehicleOwned[idcar]][cAlarm] == 2)
                    {
                        HotWireTime[playerid] = 120;
                    }
                    else if(CarInfo[VehicleOwned[idcar]][cAlarm] == 3)
                    {
                        HotWireTime[playerid] = 128;
                    }
                    else
                    {
                        HotWireTime[playerid] = 30;
                    }
                }
                else
                {
                    SendClientMessage(playerid,COLOR_GREY,"You was not asked to Hotwire this vehicle!");
                }
            }
            else
            {
                SendClientMessage(playerid,COLOR_GREY,"You are not even in a vehicle or the Driver of it!");
            }
            return 1;
        }
    }
Reply
#2

Uhh... Anyone please?
Reply
#3

could you mark the lines that cause the errors? then I could maybe help you faster
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)