SA-MP Forums Archive
What's wrong? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: What's wrong? (/showthread.php?tid=125910)



What's wrong? - buljons - 06.02.2010

CAn somebody please say what's wron with this code?
http://pastebin.com/d58f8bfdd


Re: What's wrong? - Calgon - 06.02.2010

What's above the brackets?


Re: What's wrong? - buljons - 06.02.2010

public OnGameModeInit()
It gives me these errors:
C:\Users\BuLjonS\Desktop\samp03asvr_R4_win32\gamem odes\grandlarc.pwn(354) : error 017: undefined symbol "playerid"
C:\Users\BuLjonS\Desktop\samp03asvr_R4_win32\gamem odes\grandlarc.pwn(355) : error 017: undefined symbol "playerid"


Re: What's wrong? - Calgon - 06.02.2010

Quote:
Originally Posted by buljons
public OnGameModeInit()
It gives me these errors:
C:\Users\BuLjonS\Desktop\samp03asvr_R4_win32\gamem odes\grandlarc.pwn(354) : error 017: undefined symbol "playerid"
C:\Users\BuLjonS\Desktop\samp03asvr_R4_win32\gamem odes\grandlarc.pwn(355) : error 017: undefined symbol "playerid"
It doesn't work like that. There's no 'playerid' variable in OnGameModeInit. There is an OnPlayerPickUpPickup callback (which is triggered when a player picks up a pickup), however.

pawn Код:
public OnGameModeInit()
{
  pickup = CreatePickup(1318, 23, 2025.1743,1532.4404,10.8203, -1);
  return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
  if(pickupid == pickup)
  {
    GivePlayerWeapon(playerid,46, 1); // They picked up your pickup, now they can have the weapon!
  }
  return 1;
}