OnDialog problem.
#5

The brackets are messed up and the case is not inside the switch along the rest. This is an example to show you:
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch (dialogid)
    {
        case 0:
        {
            // code..
        }
        case 1:
        {
            // code..
        }
        }
        case 2:
        {
            // code..
        }
    }
    return 0;
}
and results to the exact same warnings/errors. Do you see the marked (red) closed bracket? It shouldn't be there at all. After indenting properly, we can figure out what is going on:
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch (dialogid)
    {
        case 0:
        {
            // code..
        }
        case 1:
        {
            // code..
        }
    }
    case 2:
    {
        // code..
    }
}
return 0;
}
The opened brackets do not match the closed brackets. After removing that bracket that caused all this, it is now indented properly:
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch (dialogid)
    {
        case 0:
        {
            // code..
        }
        case 1:
        {
            // code..
        }
        case 2:
        {
            // code..
        }
    }
    return 0;
}
and causes no errors and warnings whatsoever.

---

So either indent the whole code from OnDialogResponse callback to find the problem or post the callback here.
Reply


Messages In This Thread
OnDialog problem. - by Mititel - 24.08.2016, 07:27
Re: OnDialog problem. - by Konstantinos - 24.08.2016, 07:55
Re: OnDialog problem. - by Mititel - 24.08.2016, 08:16
Re: OnDialog problem. - by Stinged - 24.08.2016, 08:27
Re: OnDialog problem. - by Konstantinos - 24.08.2016, 08:32

Forum Jump:


Users browsing this thread: 4 Guest(s)