Problem with dialogs [+REP] - 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: Problem with dialogs [+REP] (
/showthread.php?tid=609414)
Problem with dialogs [+REP] -
[SU]Spartan - 12.06.2016
Код:
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.
Re: Problem with dialogs [+REP] -
[SU]Spartan - 12.06.2016
nvm solved
Re: Problem with dialogs [+REP] -
moura98 - 12.06.2016
you must create array language to work
ex:
new language[MAX_PLAYERS];