Multi-Dimensional Arrays
#1

pawn Код:
new DialogTexts[][] =
{
    "Text",
   
    "text",

    "text"
};
It gives me
Код:
error 001: expected token: ";", but found "-identifier-"
Reply
#2

add "," or ";" in the last "text"
Reply
#3

EDIT: nvm I didn't read the code properly

Quote:
Originally Posted by Cannary2048
Посмотреть сообщение
add "," or ";" in the last "text"
No. You don't add a comma on the last element of the array.
Reply
#4

If I use DialogTexts[] instead of DialogTexts[][] then it's not a multidimensional array and I tried that it still gives the same error
Reply
#5

Can you show the line it has errors on?
Reply
#6

Forgot to add the ; after closing brace.
Reply
#7

Try
pawn Код:
new DialogTexts[3][64] =
{
    "Text",
   
    "text",

    "text"
};
Reply
#8

pawn Код:
new Dialogs[][144] = {
        "LoL123Ahahahaha",
        "Lol123Ahaahahah",
        "Lol123Aahahahah"
    };
That works.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)