What could be wrong?
#1

So i have code under OnDialogResponse similar to this:

pawn Код:
switch(dialogid)
{
    case SOME_DIALOG:
    {
        new string[128];
        format(string, sizeof(string), "Hello, your ID is %d." playerid);
        SendClientMessage(playerid, COLOR_SOMETHING, string);
    }

    case SOME_OTHER_DIALOG:
    {
        new string[128]; // <- error 021: symbol already defined
        format(string, sizeof(string), "Hello, your ID is %d." playerid);
        SendClientMessage(playerid, COLOR_SOMETHING, string);
    }
}
Even if the "new string[128]" is nested under some if's it still returns an error.

What could it be? Please help, thanks.
Reply
#2

show us the errors u get
Reply
#3

Quote:

// <- error 021: symbol already defined

He already did...

---

Is "string[128];" defined anywhere outside of a callback (or if statement)?
Reply
#4

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
Is "string[128];" defined anywhere outside of a callback (or if statement)?
Nope, that's why it's so strange. :/
Reply
#5

You either have it as a global variable, or a parameter in a callback/function.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)