Jump to content
  • 0

Error 017 Linia 14


Pinki95

Question

Cum as putea rezolva problema asta ca numi dau seama nici cum:

C:\Documents and Settings\SkyNet\Desktop\ATM.pwn(14) : error 017: undefined symbol "playerid"

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

1 Error.

Pawno script:

[pawn]// This is a comment

// uncomment the line below if you want to write a filterscript

//#define FILTERSCRIPT

#include <a_samp>

#include <streamer>

#include <ATM>

#define COLOR_RED 0xFF0000AA

#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1

public OnGameModeInit()

{

for(new i = 0; i < sizeof(AtmInfo); i++)

{

if(IsPlayerInRangeOfPoint(playerid, 3.0, AtmInfo[aX], AtmInfo[aY], AtmInfo[aZ]))

{

if(AtmInfo[aCreated] == 1)

{

CreateAtm(-541.3666, 2600.2646, 53.4154, -540.5731, 2600.2578, 53.4141);

return 1;

}

}

}

return 1;

}

public OnPlayerCommandText(playerid, cmdtext[])

{

dcmd(robatm,6,cmdtext);

return 1;

}

dcmd_robatm(playerid,params[])

{

    #pragma unused params

new string[128];

new crand = random(100);

if(crand <= 30)

{

    SendClientMessage(playerid,COLOR_RED,"Rob attempt failed.");

return 1;

}

if(GetPlayerWantedLevel(playerid) < 1)

{

  new Want = GetPlayerWantedLevel(playerid);

          format(string,sizeof(string),"Players with the $%d wanted level can't rob ATM's.",Want);

          SendClientMessage(playerid,COLOR_RED,string);

          return 1;

}

    for(new i = 0; i < sizeof(AtmInfo); i++)

      {

          if(IsPlayerInRangeOfPoint(playerid, 3.0, AtmInfo[aX], AtmInfo[aY], AtmInfo[aZ]))

            {

              if(AtmInfo[aCreated] == 1)

              {

                new RCash = randomEx(5000,50000);

              SendClientMessage(playerid,COLOR_RED,"[[_ATM Robbed_]]");

              format(string,sizeof(string),"You have robbed $%d from.",RCash);

          SendClientMessage(playerid,COLOR_RED,string);

              GivePlayerMoney(playerid,RCash);

              SetPlayerWantedLevel(playerid,2);

            return 1;

}

}

    }

    return 1;

}

stock randomEx(minnum = cellmin, maxnum = cellmax) return random(maxnum - minnum + 1) + minnum; // Credits Y_Less[/pawn]

Si Includele ATM:

[pawn]#include <a_samp>

#define COLOR_BLUE 0x0000FFAA

#define MAX_ATMS 2000

enum AInfo

{

aCreated,

    Float:aX,

    Float:aY,

    Float:aZ,

    Float:arX,

    Float:arY,

    Float:arZ,

    aObject,

};

new AtmInfo[MAX_ATMS][AInfo];

stock CreateAtm(Float:x,Float:y,Float:z,Float:rx,Float:ry,Float:rz)

{

    for(new i = 0; i < sizeof(AtmInfo); i++)

  {

      if(AtmInfo[aCreated] == 0)

      {

            AtmInfo[aCreated]=1;

            AtmInfo[aX]=x;

            AtmInfo[aY]=y;

            AtmInfo[aZ]=z;

            AtmInfo[arX]=rx;

            AtmInfo[arY]=ry;

            AtmInfo[arZ]=rz;

            AtmInfo[aObject] = CreateObject(2942, x, y, z, rx, ry, rz);

            CreateDynamicMapIcon(rx, ry, rz, 52, -1,-1,-1, -1, 250.0);

        return 1;

      }

  }

  return 0;

}[/pawn]

560x95_F01616_1625F2_030303_000000.png
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.