Dialog Response, Get Duel ID
#6

Quote:
Originally Posted by Mencent
Посмотреть сообщение
Yes look at my example:
PHP код:
if(dialogid == 5000)
{
    if(
response)
    {
        new 
count,i;
        for(;
i<MAX_DUELS;i++)
        {
            if(
Duel[i][DuelExiste])
            {
                if(
listitem == count)
                {
                    
//i = ID of the Duel
                    
return 1;
                }
                
count ++;
            }
        }
    }
    return 
1;

It's right

Mencent
No, don't ever return a value in a loop, break the loop first and then return the value afterwards. Plus this is totally unnecessary, just store the option in a variable and then use it somewhere else.
Reply


Messages In This Thread
Dialog Response, Get Duel ID - by AlexBlack - 11.04.2015, 17:17
AW: Dialog Response, Get Duel ID - by Mencent - 11.04.2015, 17:23
Re : Dialog Response, Get Duel ID - by AlexBlack - 11.04.2015, 17:25
Re: Dialog Response, Get Duel ID - by SickAttack - 11.04.2015, 17:29
AW: Dialog Response, Get Duel ID - by Mencent - 11.04.2015, 17:29
Re: AW: Dialog Response, Get Duel ID - by SickAttack - 11.04.2015, 17:36
AW: Dialog Response, Get Duel ID - by Mencent - 11.04.2015, 17:38
Re: AW: Dialog Response, Get Duel ID - by SickAttack - 11.04.2015, 17:40
Re : Dialog Response, Get Duel ID - by AlexBlack - 11.04.2015, 17:54
Re : Dialog Response, Get Duel ID - by AlexBlack - 11.04.2015, 18:44

Forum Jump:


Users browsing this thread: 1 Guest(s)