SA-MP Forums Archive
expected token and argument mistmatch - 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: expected token and argument mistmatch (/showthread.php?tid=612217)



expected token and argument mistmatch - kampuman - 15.07.2016

I'm getting these errors after compiling

Код:
(3726) : error 001: expected token: "-identifier-", but found "-string-"
(3730) : error 035: argument type mismatch (argument 2)
(3731) : error 035: argument type mismatch (argument 2)
Код:
	if (newkeys & KEY_HORN)
    {
        if(GetPlayerState(playerid) == 2)
        {
            new veh = GetPlayerVehicleID(playerid);
            new Float:x,Float:y,Float:z;
            new VehicleID,Float:B;
            GetVehiclePos(veh,x,y,z);
            SetVehiclePos(veh,x,y,z+3);
            VehicleID = GetPlayerVehicleID(playerid);
            GetVehicleZAngle(VehicleID,B);
            SetVehicleZAngle(VehicleID,B);
            SetVehicleVelocity(VehicleID, 0.0, 0.0, 0.1);
            SetVehicleAngularVelocity(VehicleID,0,0,0);
        }
    }



Re: expected token and argument mistmatch - JustMe.77 - 15.07.2016

Could you tell me which line 3726, 3730 & 3731 are ?


Re: expected token and argument mistmatch - kampuman - 15.07.2016

Oh i forgot to add

3726 is new VehicleID,Float:B;

3730 is GetVehicleZAngle(VehicleID,B);
3730 is SetVehicleZAngle(VehicleID,B);

i think its because of Float:B;

FIXED: I had to change Float:B to Float:v

I don't know what exactly the problem was but it fixed.


Re: expected token and argument mistmatch - JustMe.77 - 15.07.2016

I can compile with no errors like this

Код HTML:
new veh = GetPlayerVehicleID(playerid);
    new Float:x,Float:y,Float:z, Float:b;
    new VehicleID;
    GetVehiclePos(veh,x,y,z);
    SetVehiclePos(veh,x,y,z+3);
    VehicleID = GetPlayerVehicleID(playerid);
    GetVehicleZAngle(VehicleID,b);
    SetVehicleZAngle(VehicleID,b);
    SetVehicleVelocity(VehicleID, 0.0, 0.0, 0.1);
    SetVehicleAngularVelocity(VehicleID,0,0,0);



Re: expected token and argument mistmatch - Flake. - 15.07.2016

nvm read it wrong