Problem with dialogs [+REP]
#1

Код:
if(language[playerid] == 0)
{
ShowPlayerDialog(playerid, 187, DIALOG_STYLE_LIST, "Languages", "English\nGreek", "Ok", "Cancel");
}
Код:
case 187:
{
if(!response) return 1;
switch(listitem)
{
case 0:
{
	language[playerid] = 1;
	return 1;
}
case 1:
{
	language[playerid] = 2;
	return 1;}}}
So I am getting those errors:

Код:
C:\Users\J\Desktop\projects 2016\ESDS 0.3.7 NEW\gamemodes\ESDS.pwn(1521) : error 028: invalid subscript (not an array or too many subscripts): "language"
C:\Users\J\Desktop\projects 2016\ESDS 0.3.7 NEW\gamemodes\ESDS.pwn(1521) : warning 215: expression has no effect
C:\Users\J\Desktop\projects 2016\ESDS 0.3.7 NEW\gamemodes\ESDS.pwn(1521) : error 001: expected token: ";", but found "]"
C:\Users\J\Desktop\projects 2016\ESDS 0.3.7 NEW\gamemodes\ESDS.pwn(1521) : error 029: invalid expression, assumed zero
C:\Users\J\Desktop\projects 2016\ESDS 0.3.7 NEW\gamemodes\ESDS.pwn(1521) : fatal error 107: too many error messages on one line

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


4 Errors.
Reply
#2

nvm solved
Reply
#3

you must create array language to work
ex:
new language[MAX_PLAYERS];
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)