errors from my pickup selection
#1

Hi, i am getting a few errors on my pickup thing, please help me, here is the code

Код:
public OnPlayerPickupPickup(playerid, pickupid)
{
	if (pickupid == HealthGood)
	{

	}
	else if (pickupid == ArmourGood)
	{

	}
	else if (pickupid == ParachuteGood)
	{

	}
	else if (pickupid == AmmoGood)
	{

	}
	else if (pickupid == HealthBad)
	{

	}
	else if (pickupid == ArmourBad)
	{

	}
	else if (pickupid == ParachuteBad)
	{

	}
	else if (pickupid == AmmoBad)
	{

	}
	return 1;
}
And errors:

Код:
C:\Documents and Settings\Cameron Banfield\Desktop\Game-Flight DM server\gamemodes\SASDM.pwn(955) : warning 235: public function lacks forward declaration (symbol "OnPlayerPickupPickup")
C:\Documents and Settings\Cameron Banfield\Desktop\Game-Flight DM server\gamemodes\SASDM.pwn(957) : error 017: undefined symbol "HealthGood"
C:\Documents and Settings\Cameron Banfield\Desktop\Game-Flight DM server\gamemodes\SASDM.pwn(40) : warning 204: symbol is assigned a value that is never used: "healthGood"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#2

Your problems are with capital letters.

You evidentally have "new healthGood" written somewhere, which needs to be changed to HealthGood.

Also, OnPlayerPickupPickup, should be OnPlayerPickUpPickup.

CaSe DoEs MaTtEr!
Reply
#3

i was only copying off the wiki :P

EDIT, thanks man for pointing that out, im new to scripting, a less has been learned :P
Reply
#4

oh yeh, one last thing, how do i set players ammo levels back to how they were when they got the weapon and how to give them a parachute?
thanks
Reply
#5

To give players a parachute you give them weapon ID 46, I don't think the ammo matters much, anything 1 or above should work, but you'll still only get 1 parachute ingame.

Not sure what you're getting at with the ammo thing though =/
Reply
#6

with the ammo, a player gets a certian amount of ammo per gun, and this ammount i changed so they are all different, but its fixed, dosnt change, but how can i make it so when they walk into the ammo icon, all the ammo gets restored to the origonal amount?
Reply
#7

https://sampwiki.blast.hk/wiki/SetPlayerAmmo?
Reply
#8

thats sort of like it, but it changes all of the weapons to the same ammo level
Reply
#9

It doesn't change all the weapons, only the ones in the specified weaponslot at a certain time.

There are 12 weaponslots, listed here: [Link]
Reply
#10

Quote:
Originally Posted by Weirdosport
It doesn't change all the weapons, only the ones in the specified weaponslot at a certain time.

There are 12 weaponslots, listed here: [Link]
ah, so i could put multiple peices of the code in, iwth different weapon slots :P
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)