Dialog.. define problem
#1

Errors/Warning:

Код:
error 018: initialization data exceeds declared size
error 018: initialization data exceeds declared size
error 048: array dimensions do not match
error 048: array dimensions do not match
error 048: array dimensions do not match
error 048: array dimensions do not match
error 048: array dimensions do not match
error 048: array dimensions do not match
Code:

pawn Код:
new
    dRegister[420][8] =
    {
        { "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[128][2] =
    {
        { "your account is registred\n" },
        { "please login into your account" }
    };
Usage example..

pawn Код:
ShowPlayerDialog(playerid, DIALOG_REG, DIALOG_STYLE_PASSWORD, "Register", dRegister, "OK", "");
Reply
#2

Why you dont use strcat its much bether https://sampwiki.blast.hk/wiki/Strcat
Reply
#3

Quote:
Originally Posted by doreto
Посмотреть сообщение
Why you dont use strcat its much bether https://sampwiki.blast.hk/wiki/Strcat
thanks..
Reply
#4

but I use that method (my method..written on the topic) to change it in a hurry .. is not there a solution?
Reply
#5

This is wrong.
pawn Код:
dRegister[420][8]
Should be other way round ([8][420]). Alternatively, you can just leave the dimensions empty. The compiler can calculate the size itself.
Reply
#6

Quote:
Originally Posted by Vince
Посмотреть сообщение
This is wrong.
pawn Код:
dRegister[420][8]
Should be other way round ([8][420]). Alternatively, you can just leave the dimensions empty. The compiler can calculate the size itself.
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
Reply
#7

uhm ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)