SA-MP Forums Archive
[GM]HELP Problem [GM]Plz - 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: [GM]HELP Problem [GM]Plz (/showthread.php?tid=65933)



[GM]HELP Problem [GM]Plz - gaborronaldo - 17.02.2009

Hey all. I i'm mading a mode.
I have a probelm xD
Код:
public OnPlayerRequestClass(playerid, classid)

{

	SetupPlayerForClassSelection(playerid);

	gPlayerClass[playerid] = classid;

	switch (classid) {

case 0:

	    {

				GameTextForPlayer(playerid, "~g~Pilota", 500, 3);

			}

	  case 1:

	    {

				GameTextForPlayer(playerid, "~b~Rendor", 500, 3);

			}

	  case 2:

	    {

				GameTextForPlayer(playerid, "~w~Civil", 500, 3);

			}

case 3:

	    {

				GameTextForPlayer(playerid, "~p~Banji", 500, 3);

			}

	  case 4:

	    {

				GameTextForPlayer(playerid, "~y~Vezeto", 500, 3);

			}

	  case 5:

	    {

				GameTextForPlayer(playerid, "~r~Mentos", 500, 3);

			}

case 9:

	    {

				GameTextForPlayer(playerid, "~bl~Da-Neng", 500, 3);

			}

}

	return 1;

}
	return 1;
}
public SetupPlayerForClassSelection(playerid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
	return 1;
 }
the erorr:
Код:
D:\sflife.pwn(125) : error 017: undefined symbol "gPlayerClass"
D:\sflife.pwn(125) : warning 215: expression has no effect
D:\sflife.pwn(125) : error 001: expected token: ";", but found "]"
D:\sflife.pwn(125) : error 029: invalid expression, assumed zero
D:\sflife.pwn(125) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.



Re: [GM]HELP Problem [GM]Plz - Kanji_Suzuki - 17.02.2009

try adding

new gPlayerClass


Re: [GM]HELP Problem [GM]Plz - Daren_Jacobson - 18.02.2009

actually he would need to add

new gPlayerClass[MAX_PLAYERS];


Re: [GM]HELP Problem [GM]Plz - gaborronaldo - 18.02.2009

doesn't works