SA-MP Forums Archive
How to fix this Error - 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)
+--- Thread: How to fix this Error (/showthread.php?tid=496636)



How to fix this Error - lizter008 - 23.02.2014

Код:
stock ShowMainMenuGUI(playerid) {
	InsideMainMenu[playerid] = 1;
	new string[22];

 	format(string, sizeof(string), "Players online: %d", Iter_Count(Player));
        TextDrawSetString(MainMenuTxtdraw[7], string);   <-----7043

	for(new i = 0; i < 12; i++) {
		TextDrawShowForPlayer(playerid, MainMenuTxtdraw[i]);
	}

	return 1;
}
Код:
C:\Documents and Settings\drei\Desktop\PRP\gamemodes\PRP.pwn(7043) : error 017: undefined symbol "MainMenuTxtdraw"
C:\Documents and Settings\drei\Desktop\PRP\gamemodes\PRP.pwn(7043) : warning 215: expression has no effect
C:\Documents and Settings\drei\Desktop\PRP\gamemodes\PRP.pwn(7043) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\drei\Desktop\PRP\gamemodes\PRP.pwn(7043) : error 029: invalid expression, assumed zero
C:\Documents and Settings\drei\Desktop\PRP\gamemodes\PRP.pwn(7043) : fatal error 107: too many error messages on one line

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


7 Errors.
Help me plsss


Re: How to fix this Error - TonyII - 23.02.2014

You should have a variable like this at the top of your scipt
pawn Код:
new Text:MainMenuTxtdraw[12];



Re: How to fix this Error - lizter008 - 23.02.2014




Re: How to fix this Error - lizter008 - 23.02.2014

i got error


Re: How to fix this Error - TonyII - 23.02.2014

The MainMenuTxtdraw must get created first.


Re: How to fix this Error - lizter008 - 23.02.2014