SA-MP Forums Archive
dialog multidimensional arrays help - 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: dialog multidimensional arrays help (/showthread.php?tid=368461)



dialog multidimensional arrays help - NewbieScripter - 13.08.2012

pawn Код:
new
    dRegister[8][80] =
    {
        "Welcome!\n\n",
        "Rules\n\n",
        "1. ... blah blah blah\n",
        "2. blah blah blah blah blah blah blah blah blah blah\n",
        "3. blah blah blah blah blah blah blah blah..................\n",
        "4. rules here.... blah blah blah................... blah blah\n",
        "5. rules here.... blah blah blah blah blah blah blah blah blah blah blah blah\n\n",
        "Register your account!\n" }
    },

    dLogin[2][34] =
    {
        "your account is registred\n",
        "please login into your account" }
    };
   
    // Usage example
   
    /* Line errors */ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Register", dRegister[8][80], "OK", "");
   
    // Errors
   
    // error 032: array index out of bounds (variable "dRegister")
    // error 032: array index out of bounds (variable "dRegister")
    // ... same for dLogin



Re: dialog multidimensional arrays help - NewbieScripter - 13.08.2012

?


Re: dialog multidimensional arrays help - Youarex - 13.08.2012

Try this.

Код:
#define REG_TEXT 	"Welcome!\n\nRules\n\n\
			1. Rule text 1\n\
			2. Rule text 2\n\
			3. Rule text 3\n\
			4. Rule text 4\n\
			5. Rule text 5\n\n\
			Register your account!\n"
pawn Код:
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Register", REG_TEXT, "OK", "");



Re: dialog multidimensional arrays help - NewbieScripter - 13.08.2012

Quote:
Originally Posted by YouareX
Посмотреть сообщение
Try this.

Код:
#define REG_TEXT 	"Welcome!\n\nRules\n\n\
			1. Rule text 1\n\
			2. Rule text 2\n\
			3. Rule text 3\n\
			4. Rule text 4\n\
			5. Rule text 5\n\n\
			Register your account!\n"
pawn Код:
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Register", REG_TEXT, "OK", "");
the pawn compiler crash...


Re: dialog multidimensional arrays help - NewbieScripter - 13.08.2012

??


Re: dialog multidimensional arrays help - NewbieScripter - 13.08.2012

uhm... help please


Re: dialog multidimensional arrays help - Youarex - 13.08.2012

How about this.

pawn Код:
#define REG_TEXT "Welcome!\n\nRules\n\n1. Rule text 1\n2. Rule text 2\n3. Rule text 3\n4. Rule text 4\n5. Rule text 5\n\nRegister your account!\n"



Re: dialog multidimensional arrays help - NewbieScripter - 13.08.2012

i have solved.. thank you anyway