Error when compile.
#1

Hello i just make /fcar park commands which means that just leader (boss) of factions can park faction vehicle.
And WHen i comppile i get this:
pawn Код:
(28594) : error 004: function "SetCarPos" is not implemented
And here is the lines:
pawn Код:
if(strcmp(cmd, "/fcar", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
        if(IsAMember(playerid) || IsACop(playerid) || PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pMember] == 3)
        {
            new fam = PlayerInfo[playerid][pMember];
            new x_job[256];
            x_job = mystrtok(cmdtext, idx);
            if(!strlen(x_job))
            {
                SendClientMessage(playerid, COLOR_GREY,".: Usage: /fcar [tow/more soon] :.");
                return 1;
            }
            if(strcmp(x_job,"tow",true) == 0)
            {
                if(IsHighRank(playerid))
                {
                    GivePlayerMoney(playerid,-10000);
                    Money[playerid] -= 10000;
                    FamilyInfo[fam][fMoney] += 10000;
                    RespawnFactionVehicles(playerid);
                }
            }
            if(strcmp(x_job,"park",true) == 0)
            {
                if(IsHighRank(playerid))
                {
                    GivePlayerMoney(playerid,-10000);
                    Money[playerid] -= 10000;
                    FamilyInfo[fam][fMoney] += 10000;
                    SetCarPos(carid);
                }
            }
Please tell me what should i do.
Reply
#2

You're missing a stock, SetCarPos().
Reply
#3

Still geting same error..
Reply
#4

And what did you do exactly? All I was telling you is, that you're missing a stock.
Reply
#5

I maked on top of my script
stock SetCarPos;
____________________
Sorry i am new in scriping
Reply
#6

pawn Код:
stock SetCarPos( carid )
{
    // Code
}
At the // Code, write code of what you want to do with this function.
Reply
#7

I cant fix it. I still get same error.
Reply
#8

Delete stock SetCarPos;
pawn Код:
stock SetCarPos(playerid, Float:Vx, Float:Vy, Float:Vz, Float:Va, Float:Px, Float:Py, Float:Pz, Float:Pa, interior)
{
    TogglePlayerControllable(playerid, 1);
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        SetVehiclePos(GetPlayerVehicleID(playerid),Vx,Vy,Vz);
        SetVehicleZAngle(GetPlayerVehicleID(playerid),Va);
        LinkVehicleToInterior(GetPlayerVehicleID(playerid),interior);
    }
    else
    {
        SetPlayerPos(playerid,Px,Py,Pz);
        SetPlayerFacingAngle(playerid,Pa);
    }
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid, interior);
    return 1;
}
And replace the SetCarPos(carid) to SetCarPos(playerid, Float:Vx, Float:Vy, Float:Vz, Float:Va, Float:Px, Float:Py, Float:Pz, Float:Pa, interior)

Since I don't know what exactly do you want this function does.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)