CMD problem?
#1

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;
}
Reply
#2

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

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;
}
Reply
#4

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

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

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

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!
Reply
#7

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

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
Reply
#9

Thank you guys is fixed now
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)