PDA

View Full Version : How to fix this Error


lizter008
23/02/2014, 03:28 AM
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 (c) 1997-2006, ITB CompuPhase


7 Errors.


Help me plsss

TonyII
23/02/2014, 03:30 AM
You should have a variable like this at the top of your scipt new Text:MainMenuTxtdraw[12];

lizter008
23/02/2014, 03:49 AM
http://i58.servimg.com/u/f58/18/61/53/35/wew_bm10.jpg (http://www.servimg.com/image_preview.php?i=58&u=18615335)

lizter008
23/02/2014, 03:53 AM
i got error

TonyII
23/02/2014, 03:55 AM
The MainMenuTxtdraw must get created first.

lizter008
23/02/2014, 07:13 AM
http://i58.servimg.com/u/f58/18/61/53/35/w10.jpg (http://www.servimg.com/image_preview.php?i=59&u=18615335)