SA-MP Forums Archive
Keep getting error on pickups. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Keep getting error on pickups. (/showthread.php?tid=102324)



Keep getting error on pickups. - [mad]MLK - 14.10.2009

i keep getting this?

Код:
C:\Users\user\Desktop\SAMP Server\Everything World\gamemodes\EverythingWorldTwoBeta.pwn(1187) : warning 235: public function lacks forward declaration (symbol "OnPlayerPickupPickup")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.



Re: Keep getting error on pickups. - Eazy_Efolife - 14.10.2009

Quote:
Originally Posted by [mad
MLK (dino-host.net) ]
i keep getting this?

Код:
C:\Users\user\Desktop\SAMP Server\Everything World\gamemodes\EverythingWorldTwoBeta.pwn(1187) : warning 235: public function lacks forward declaration (symbol "OnPlayerPickupPickup")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
forward OnPlayerPickUpPickup(playerid, pickupid);


Re: Keep getting error on pickups. - [mad]MLK - 14.10.2009

You don't forward it.


Re: Keep getting error on pickups. - Eazy_Efolife - 14.10.2009

Quote:
Originally Posted by [mad
MLK (dino-host.net) ]
i know but since when did you have to forward it lol
I don't know something must be wrong with your sa-mp includes


Re: Keep getting error on pickups. - Joe Staff - 15.10.2009

You have your capitalization wrong.

OnPlayerPickUpPickup


Re: Keep getting error on pickups. - [mad]MLK - 15.10.2009

Yea that worked, Thanks, BTW the wiki needs fixing as thats were i got it from.


Re: Keep getting error on pickups. - Redirect Left - 15.10.2009

Quote:
Originally Posted by [mad
MLK (dino-host.net) ]
Yea that worked, Thanks, BTW the wiki needs fixing as thats were i got it from.
https://sampwiki.blast.hk/wiki/OnPlayerPickUpPickup
Fine to me..


Re: Keep getting error on pickups. - [mad]MLK - 15.10.2009

The link: https://sampwiki.blast.hk/wiki/PickupGuide

The Example:

Код:
public OnPlayerPickupPickup(playerid, pickupid)
{
  if(pickupid == mypickup) // Check that the pickup ID of the pickup they picked up is mypickup
  {
    // It is
    SendClientMessage(playerid, 0xFFFFFFFF, "You received $10000!"); // Message the player
    GivePlayerMoney(playerid, 10000); // Give the player the money
  }
  else if (pickupid == (some other pickup))
  {
    // Another pickup, do something else
  }
  return 1;
}



Re: Keep getting error on pickups. - AiVAMAN - 16.10.2009

pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
  if(pickupid == mypickup) // Check that the pickup ID of the pickup they picked up is mypickup
  {
    // It is
    SendClientMessage(playerid, 0xFFFFFFFF, "You received $10000!"); // Message the player
    GivePlayerMoney(playerid, 10000); // Give the player the money
  }
  else if (pickupid == (some other pickup))
  {
    // Another pickup, do something else
  }
  return 1;
}
should be public OnPlayerPickUpPickup(playerid, pickupid)
not public OnPlayerPickupPickup(playerid, pickupid)


Re: Keep getting error on pickups. - Mikep. - 16.10.2009

My fault about the wiki typo :P