SA-MP Forums Archive
CMD problem? - 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: CMD problem? (/showthread.php?tid=336946)



CMD problem? - N0FeaR - 24.04.2012

Error i get
Код:
C:\Users\Robins\Desktop\New folder\pawno\include\/CRP/Commands/placeboombox.pwn(5) : error 017: undefined symbol "Positions"
C:\Users\Robins\Desktop\New folder\pawno\include\/CRP/Commands/placeboombox.pwn(5) : warning 215: expression has no effect
C:\Users\Robins\Desktop\New folder\pawno\include\/CRP/Commands/placeboombox.pwn(5) : error 001: expected token: ";", but found "]"
C:\Users\Robins\Desktop\New folder\pawno\include\/CRP/Commands/placeboombox.pwn(5) : error 029: invalid expression, assumed zero
C:\Users\Robins\Desktop\New folder\pawno\include\/CRP/Commands/placeboombox.pwn(5) : fatal error 107: too many error messages on one line

cmd
pawn Код:
CMD:placeboombox(playerid, params[])
{
    if (PlayerInfo[playerid][pAdministrator] == 4)
    {
        GetPlayerPos(playerid,Positions[0][0], Positions[0][1], Positions[0][2]);
        SetPVarFloat(playerid, "DYN_Boombox_FLOAT_X", Positions[0][0]);
        SetPVarFloat(playerid, "DYN_Boombox_FLOAT_Y", Positions[0][1]);
        SetPVarFloat(playerid, "DYN_Boombox_FLOAT_Z", Positions[0][2]);
        PlayerInfo[playerid][pBoombox] = CreateDynamicObject(2103, Positions[0][0], Positions[0][1], Positions[0][2]-0.9, 0, 0, 3.9700012207031);
        ApplyAnimation(playerid,"BOMBER","BOM_Plant",4.0,0,0,0,0,0);
        ApplyAnimation(playerid,"BOMBER","BOM_Plant",4.0,0,0,0,0,0);
        SendClientMessageEx(playerid, COLOR_YELLOW, "You have placed Boombox on the ground, /pickupboombox to remove it.");
    }
    return 1;
}



Re: CMD problem? - Claude - 24.04.2012

Add this to your script
pawn Код:
new Float:Positions[1][3];



Re: CMD problem? - N0FeaR - 24.04.2012

Thank, can you help me with this too?

Error
Код:
C:\Users\Robins\Desktop\New folder\pawno\include\CRP/Commands/pickupboombox.pwn(15) : error 017: undefined symbol "PickUpBoombox"
cmd
pawn Код:
CMD:pickupboombox(playerid, params[])
{
    if (PlayerInfo[playerid][pAdministrator] != 4)
    {
        SendClientMessage(playerid, COLOR_RED, "You are not a Executive Administrator!");
        return 1;
    }
    if (PlayerInfo[playerid][pBoombox] == 0)
    {
        SendClientMessage(playerid, COLOR_RED, "You haven't placed a Boombox!");
        return 1;
    }
    if(IsPlayerInRangeOfPoint(playerid, 3.0, GetPVarFloat(playerid, "DYN_Boombox_FLOAT_X"), GetPVarFloat(playerid, "DYN_Boombox_FLOAT_Y"), GetPVarFloat(playerid, "DYN_Boombox_FLOAT_Z")))
    {
        PickUpBoombox(playerid);
        SendClientMessage(playerid, COLOR_YELLOW, "Boombox picked up successfully.");
        return 1;
    }
    return 1;
}



Re: CMD problem? - vassilis - 24.04.2012

The problem is that you don't have a stock named PickupBoombBox


Re: CMD problem? - Twisted_Insane - 24.04.2012

Totally wrong, you'd need a stock (function), and no callback...

pawn Код:
stock PickupBoombox(playerid)
{
    //what shall it do?
}



Re: CMD problem? - vassilis - 24.04.2012

Quote:
Originally Posted by Twisted_Insane
Посмотреть сообщение
Totally wrong, you'd need a stock (function), and no callback...

pawn Код:
stock PickupBoombox(playerid)
{
    //what shall it do?
}
Did i say callback?where?
EDIT:Oh my god i am blind sorry for this typo!


Re: CMD problem? - Twisted_Insane - 24.04.2012

You've just edited it, mister; don't try to fool me, okay?


Re: CMD problem? - vassilis - 24.04.2012

Quote:
Originally Posted by Twisted_Insane
Посмотреть сообщение
You've just edited it, mister; don't try to fool me, okay?
No i said i make a mistake?i didnt try to fool you xD


Re: CMD problem? - N0FeaR - 24.04.2012

Thank you guys is fixed now