errors from my pickup selection -
Stunterz - 10.08.2009
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.
Re: errors from my pickup selection -
Weirdosport - 10.08.2009
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!
Re: errors from my pickup selection -
Stunterz - 10.08.2009
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
Re: errors from my pickup selection -
Stunterz - 10.08.2009
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
Re: errors from my pickup selection -
Weirdosport - 10.08.2009
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 =/
Re: errors from my pickup selection -
Stunterz - 10.08.2009
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?
Re: errors from my pickup selection -
Weirdosport - 10.08.2009
https://sampwiki.blast.hk/wiki/SetPlayerAmmo?
Re: errors from my pickup selection -
Stunterz - 10.08.2009
thats sort of like it, but it changes all of the weapons to the same ammo level
Re: errors from my pickup selection -
Weirdosport - 10.08.2009
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]
Re: errors from my pickup selection -
Stunterz - 10.08.2009
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