27.04.2011, 09:33
Hi I am getting these errors and warning from ym script.
Here is my code for OnPlayerPickUpPickup:
Line 57, this is under OnGameModeInit
I have these defined at the top:
So whats wrong with this then?
Код:
(76) : error 028: invalid subscript (not an array or too many subscripts): "armourpickup" (78) : warning 217: loose indentation (80) : error 010: invalid function or declaration (57) : warning 204: symbol is assigned a value that is never used: "armourpickup"
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == healthpickup)
{
SendClientMessage(playerid, COLOR_RED, "You are now healed, you cannot collect this again until after death.");
SetPlayerHealth(playerid, 100);
}
else if(pickupid == (armourpickup)
{ // Line 76
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Your armour has been refilled, you cannot collect this again until after death.");
SetPlayerArmour(playerid, 100); // Line 78
}
return 1; // Line 80
}
Line 57, this is under OnGameModeInit
pawn Код:
armourpickup = CreatePickup(1242, 3, -2245.4641, 2301.4973, 4.9700, -1);
I have these defined at the top:
pawn Код:
// Variables
new healthpickup;
new armourpickup;
So whats wrong with this then?