variable errors
#1

Hello i made a mini dm game and i have the following errors
here is my code for the spawns of the minigame:
Код:
new Float:1hpPoints[4][4] ={
{2199.7000,1074.6987,29.4129},
{2269.0085,1053.1139,29.3750},
{2270.1978,1116.9293,29.3750},
{2247.3816,1122.2286,33.5234}
};
here are the errors for this:
pawn Код:
freeroam.pwn(100) : error 020: invalid symbol name ""
freeroam.pwn(105) : error 010: invalid function or declaration
here is the variable codes
Код:
new 1hp[MAX_PLAYERS];
Код:
if(1hp[playerid] == 1)
	{
	   ResetPlayerWeapons(playerid);
	   GivePlayerWeapon(playerid,24,99999);
	   SetPlayerHealth(playerid,1);
	   new rnd = random(sizeof(1hpPoints));
	   SetPlayerPos(playerid,1hpPoints[rnd][0],1hpPoints[rnd][1],1hpPoints[rnd][2]);
	   SetPlayerFacingAngle(playerid,1hpPoints[rnd][3]);
	}
errors for the following codes
pawn Код:
freeroam.pwn(120) : error 020: invalid symbol name ""
freeroam.pwn(2259) : error 029: invalid expression, assumed zero
freeroam.pwn(2259) : error 017: undefined symbol "hp"
freeroam.pwn(2259) : warning 215: expression has no effect
freeroam.pwn(2259) : error 001: expected token: ";", but found "]"
freeroam.pwn(2259) : fatal error 107: too many error messages on one line
Reply
#2

Код:
new Float:1hpPoints[4][3] =
{
{2199.7000,1074.6987,29.4129},
{2269.0085,1053.1139,29.3750},
{2270.1978,1116.9293,29.3750},
{2247.3816,1122.2286,33.5234}
};
you writted 4 expect 3, you are using 3, X,Y,Z...
Reply
#3

same problem bro
Reply
#4

Do NOT use numbers as first character. Change 1hpPoints to hpPoints and 1hp to hp.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)