error 017 and warning 217
#1

I can not compile. i have error . pls help me

Код:
#include <a_samp>
#include <zcmd>

// Some configurations for the script to work

new IsDrugger[MAX_PLAYERS];
new HasMaterials[MAX_PLAYERS];
new HasDrugs[MAX_PLAYERS];
new IsDrunk[MAX_PLAYERS];
new lightblue = 0xADD8E6FF;
new red = 0xFF0000AA;

public OnFilterScriptInit()
{
   // Takejob configurations

   CreatePickup(1239, 1, 2065.2837,-1558.5857,13.4369, -1);
   Create3DTextLabel("Drugger job\n/takedruggerjob | /quitdruggerjob", 0xFF0000AA, 2065.2837,-1558.5857,13.4369, 5.0, 0, 0);

   // pickupmaterials configurations

   CreatePickup(1254, 1, 2067.4619, -1561.9774, 13.4270, -1);
   Create3DTextLabel("Drugger job\n/pickupmaterials", 0xFF0000AA, 2067.4619,-1561.9774,13.4270, 5.0, 0, 0);

   // createdrugs configurations

   CreatePickup(1279, 1, 2355.3733, -648.4775, 128.0547, -1);
   Create3DTextLabel("Drugger job\n/createdrugs", 0xFF0000AA, 2355.3733, -648.4775, 128.0547, 5.0, 0, 0);

   return 1;
}

public OnPlayerSpawn(playerid)
{
   return 1;
}

COMMAND:takedruggerjob(playerid, params[])
{
        if(IsDrugger[playerid] == 0)
        {
                if(IsPlayerInRangeOfPoint(playerid, 1.0, 2065.2837, -1558.5857, 13.4369))
                {
                    IsDrugger[playerid] = 1;
                    SendClientMessage(playerid, lightblue, "Congratulations. You're now an Drugger. For more help about your job please use '/druggerhelp'.");
                }
                else
                   SendClientMessage(playerid, red, "[ERROR] You're not at the place to take the Drugger job.");
        }
        else
           SendClientMessage(playerid, red, "[ERROR] You're already an Drugger.");
        return 1;
}

COMMAND:quitdruggerjob(playerid, params[])
{
   if(IsDrugger[playerid] == 1)
   {
           SendClientMessage(playerid, lightblue, "You left your drugger job.");
           IsDrugger[playerid] = 0;
   }
   else
          SendClientMessage(playerid, red, "[ERROR] You're not an drugger.");
   return 1;
}

COMMAND:druggerhelp(playerid, params[])
{
        new msg[2000];

        format(msg, 2000, "%s{FFFFFF}Hello Drugger,\n\n\n", msg);
        format(msg, 2000, "%s{FFFFFF}These are the commands of your job:\n\n", msg);
        format(msg, 2000, "%s{FF0000}1. {FFFFFF}/takedruggerjob -> Takes the Drugger job\n", msg);
        format(msg, 2000, "%s{FF0000}2. {FFFFFF}/pickupmaterials -> Picks up the required materials for creating drugs\n", msg);
        format(msg, 2000, "%s{FF0000}3. {FFFFFF}/quitdruggerjob -> Quits the Drugger job\n", msg);
        format(msg, 2000, "%s{FF0000}4. {FFFFFF}/createdrugs -> Creates drugs\n", msg);
        format(msg, 2000, "%s{FF0000}5. {FFFFFF}/givedrugs -> You can trade drugs for cash with other players near you\n", msg);
        format(msg, 2000, "%s{FF0000}6. {FFFFFF}/usedrugs -> You can use the drugs you got\n", msg);
        format(msg, 2000, "%s{FF0000}7. {FFFFFF}/mydrugs -> Checks if you got drugs or not\n\n", msg);
        format(msg, 2000, "%s{FFFFFF}Thank you for reading the help menu", msg);

        if(IsDrugger[playerid] == 1)
        {
            ShowPlayerDialog(playerid, 5678, DIALOG_STYLE_MSGBOX, "{FFFFFF}Drugger Help", msg, "Okay", "");
            return 1;
        }
        else
           SendClientMessage(playerid, red, "[ERROR] You're not an Drugger.");
        return 1;
}
COMMAND:pickupmaterials(playerid, params[])
{
        if(IsDrugger[playerid] == 1)
        {
                if(HasMaterials[playerid] == 0)
                {
                if(IsPlayerInRangeOfPoint(playerid, 1.0, 2067.4619,-1561.9774,13.4270))
                {
                SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
                SetTimer("pickingmaterials", 5000, false);
                SendClientMessage(playerid, lightblue, "You started loading part of drugs materials.");
                TogglePlayerControllable(playerid, 0);
                }
                else
                   SendClientMessage(playerid, red, "[ERROR] You're not at the materials pickup position.");
        }
        else
           SendClientMessage(playerid, red, "[ERROR] You can only load 1 pack of materials at one time.");
        }
        else
           SendClientMessage(playerid, red, "[ERROR] You're not a Drugger.");
}

forward pickingmaterials(playerid);

public pickingmaterials(playerid)
{
        HasMaterials[playerid] = 1;
        SendClientMessage(playerid, lightblue, "You have loaded the materials successfully. Take care of police.");
        TogglePlayerControllable(playerid, 1);
        SetPlayerCheckpoint(playerid, 2355.3733, -648.4775, 128.0547, 1.0);
        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
        return 1;
}

COMMAND:createdrugs(playerid, params[])
{
        if(IsDrugger[playerid] == 1)
        {
                if(IsPlayerInRangeOfPoint(playerid, 1.0, 2355.3733, -648.4775, 128.0547))
                {
                        HasDrugs[playerid] = 1;
                        SendClientMessage(playerid, lightblue, "Congratulations. You've created drugs.");
                }
                else
                   SendClientMessage(playerid, red, "[ERROR] You're not at the drugs creation place.");
        }
        else
           SendClientMessage(playerid, red, "[ERROR] You're not an Drugger.");
 }

COMMAND:usedrugs(playerid, params[])
{
        if(HasDrugs[playerid] == 1)
        {
        HasDrugs[playerid] = 0;
        SetTimer("drunkstart", 5000, false);
        TogglePlayerControllable(playerid, 0);
        SendClientMessage(playerid, lightblue, "You're now using the drugs. It will take a while till you finish it all.");
        }
        else
           SendClientMessage(playerid, red, "[ERROR] You don't have drugs. Ask someone who has it to give it to you.");
}

forward drunkstart(playerid);

public drunkstart(playerid)
{
    IsDrunk[playerid] = 1;
    TogglePlayerControllable(playerid, 1);
    SetPlayerDrunkLevel(playerid, 50000);
    SendClientMessage(playerid, lightblue, "You're now under effects of drugs. Be sure the cops wont bust you.");
    SetTimer("drunkmiddle", 15000, false);
    return 1;
}

forward drunkmiddle(playerid);

public drunkmiddle(playerid)
{
    SendClientMessage(playerid, lightblue, "You've slowly recovering your self from the drugs.");
    SetPlayerDrunkLevel(playerid, 25000);
    SetTimer("drunkend", 7500, false);
    return 1;
}

forward drunkend(playerid);

public drunkend(playerid)
{
        SetPlayerDrunkLevel(playerid, 0);
        SendClientMessage(playerid, lightblue, "You fully recovered your self from the drugs.");
        IsDrunk[playerid] = 0;
        return 1;
}

COMMAND:mydrugs(playerid, params[])
{
        if(HasDrugs[playerid] == 1)
        {
           SendClientMessage(playerid, lightblue, "You have drugs in your bag.");
        }
        else if(HasDrugs[playerid] == 0)
        {
           SendClientMessage(playerid, lightblue, "You don't have any drugs in your bag.");
        }
        return 1;
}

COMMAND:givedrugs(playerid, params[])
{
        new OtherPlayer, OtherPlayerName[24], msg[2000], YourName[24];
        new Float:x, Float:y, Float:z;
        GetPlayerPos(playerid, x, y, z);

        if(HasDrugs[playerid] == 1)
        {
           if(IsPlayerInRangeOfPoint(OtherPlayer, 2.0, x, y, z))
           {
           GetPlayerName(OtherPlayer, OtherPlayerName, sizeof(OtherPlayerName));
           GetPlayerName(playerid, YourName, sizeof(YourName));
           HasDrugs[OtherPlayer] = 1;
           HasDrugs[playerid] = 0;
           format(msg, 2000, "You've sent drugs to %s.", OtherPlayerName);
           SendClientMessage(playerid, lightblue, msg);
           format(msg, 2000, "You've recieved drugs from %s.", YourName);
           SendClientMessage(OtherPlayer, lightblue, msg);
           }
           else
              SendClientMessage(playerid, red, "[ERROR] You're not near that person.");
    }
        else
           SendClientMessage(playerid, red, "[ERROR] You can't send drugs you don't own.");
        return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
    DisablePlayerCheckpoint(playerid);
    return 1;
}
Код:
C:\Users\ta\Desktop\drugs.pwn(99) : error 017: undefined symbol "SPECIAL_ACTION_CARRY"
C:\Users\ta\Desktop\drugs.pwn(107) : warning 217: loose indentation
Reply
#2

Do this on top of your script
pawn Код:
#pragma  tabsize 0
And idk about the special action, maybe download "a_samp" inc updated
Because this Special action has been added in 0.3x
+Rep if work
Reply
#3

Replace the pickupmaterials command with and tell me if you still got errors
pawn Код:
COMMAND:pickupmaterials(playerid, params[])
{
    if(IsDrugger[playerid] == 1)
    {
        if(HasMaterials[playerid] == 0)
        {
            if(IsPlayerInRangeOfPoint(playerid, 1.0, 2067.4619,-1561.9774,13.4270))
            {
                SetPlayerSpecialAction(playerid, "SPECIAL_ACTION_CARRY");
                SetTimer("pickingmaterials", 5000, false);
                SendClientMessage(playerid, lightblue, "You started loading part of drugs materials.");
                TogglePlayerControllable(playerid, 0);
             }
             else
             SendClientMessage(playerid, red, "[ERROR] You're not at the materials pickup position.");
        }
        else SendClientMessage(playerid, red, "[ERROR] You can only load 1 pack of materials at one time.");
    }
    else SendClientMessage(playerid, red, "[ERROR] You're not a Drugger.");
}
Reply
#4

Update your a_players include
Go to Pawno - include - a_players , press on it right click - Edit - add to it :
PHP Code:
Quote:

#define SPECIAL_ACTION_CARRY

Then Save
Done you have updated your include
Reply
#5

i got one error

Код:
C:\Users\ta\Desktop\drugs.pwn(100) : error 017: undefined symbol "SPECIAL_ACTION_CARRY"
Reply
#6

Quote:
Originally Posted by vn007322815
Посмотреть сообщение
i got one error

Код:
C:\Users\ta\Desktop\drugs.pwn(100) : error 017: undefined symbol "SPECIAL_ACTION_CARRY"
Quote:

Update your a_players include
Go to Pawno - include - a_players , press on it right click - Edit - add to it :

#define SPECIAL_ACTION_CARRY

Then Save
Done you have updated your include

As he said
Reply
#7

Try this
pawn Код:
COMMAND:pickupmaterials(playerid, params[])
{
    if(IsDrugger[playerid] == 1)
    {
        if(HasMaterials[playerid] == 0)
        {
            if(IsPlayerInRangeOfPoint(playerid, 1.0, 2067.4619,-1561.9774,13.4270))
            {
                ApplyAnimation(playerid,"PED","SPECIAL_ACTION_CARRY",4.1,1,1,1,1,1,1);
                SetTimer("pickingmaterials", 5000, false);
                SendClientMessage(playerid, lightblue, "You started loading part of drugs materials.");
                TogglePlayerControllable(playerid, 0);
             }
             else
             SendClientMessage(playerid, red, "[ERROR] You're not at the materials pickup position.");
        }
        else SendClientMessage(playerid, red, "[ERROR] You can only load 1 pack of materials at one time.");
    }
    else SendClientMessage(playerid, red, "[ERROR] You're not a Drugger.");
}
Reply
#8

Quote:
Originally Posted by damian123
Посмотреть сообщение
Update your a_players include
Go to Pawno - include - a_players , press on it right click - Edit - add to it :
PHP Code:

Then Save
Done you have updated your include
i got 2 erorr

Код:
C:\Users\ta\Desktop\drugs.pwn(100) : error 029: invalid expression, assumed zero
C:\Users\ta\Desktop\drugs.pwn(100) : error 035: argument type mismatch (argument 2)
Reply
#9

Quote:
Originally Posted by vn007322815
Посмотреть сообщение
i got one error

Код:
C:\Users\ta\Desktop\drugs.pwn(100) : error 017: undefined symbol "SPECIAL_ACTION_CARRY"
Update your includes of anims, i think it's "a_players" like damian said or "a_samp" and maybe it will work
Reply
#10

Quote:
Originally Posted by SilentSoul
Посмотреть сообщение
Try this
pawn Код:
COMMAND:pickupmaterials(playerid, params[])
{
    if(IsDrugger[playerid] == 1)
    {
        if(HasMaterials[playerid] == 0)
        {
            if(IsPlayerInRangeOfPoint(playerid, 1.0, 2067.4619,-1561.9774,13.4270))
            {
                ApplyAnimation(playerid,"PED","SPECIAL_ACTION_CARRY",4.1,1,1,1,1,1,1);
                SetTimer("pickingmaterials", 5000, false);
                SendClientMessage(playerid, lightblue, "You started loading part of drugs materials.");
                TogglePlayerControllable(playerid, 0);
             }
             else
             SendClientMessage(playerid, red, "[ERROR] You're not at the materials pickup position.");
        }
        else SendClientMessage(playerid, red, "[ERROR] You can only load 1 pack of materials at one time.");
    }
    else SendClientMessage(playerid, red, "[ERROR] You're not a Drugger.");
}
is working thank u so much and thank you every one for support
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)