calling enum with index
#9

Integers can't be directly used to specify which enum is being called since they can have different sizes.

Код:
ServidorInfo[SI:0] = strval(inputtext);
Is actually:
Код:
ServidorInfo[MaxPing] = strval(inputtext);
And your code is wrong, this is how you should do it:
pawn Код:
case DIALOG_MENUSERVER:
        {
            if(response)
            {
                if(ConfigVal(listitem) == "0" || ConfigVal(listitem) == "1")
                {
                    new params[1];
                    cmd_configmenu(playerid,params);
                }
                else
                {
                    ShowPlayerDialog(playerid,DIALOG_VALORCONFIG,DIALOG_STYLE_INPUT,"Config","Insert new value:","Accept","Exit");
                }
            }
        }
        case DIALOG_VALOROONFIG:
        {
            if(response)
            {
                ServidorInfo[SI:listitem] = inputtext;
            }
        }
Reply


Messages In This Thread
calling enum with index - by mcreed - 25.03.2016, 18:16
Re: calling enum with index - by Mencent - 25.03.2016, 18:25
Respuesta: Re: calling enum with index - by mcreed - 25.03.2016, 18:34
Re: calling enum with index - by Mencent - 25.03.2016, 18:36
Respuesta: calling enum with index - by mcreed - 25.03.2016, 18:37
Re: calling enum with index - by Mencent - 25.03.2016, 20:21
Respuesta: Re: calling enum with index - by mcreed - 25.03.2016, 21:08
Re: calling enum with index - by Misiur - 25.03.2016, 21:54
Re: calling enum with index - by Gammix - 25.03.2016, 21:54
Respuesta: Re: calling enum with index - by mcreed - 25.03.2016, 23:00

Forum Jump:


Users browsing this thread: 1 Guest(s)