Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Else statement get's called, even though if statement above is true

$
0
0
Hello, I have a little issue in my code. Shortly, inside of callback OnPlayerClickPlayerTextDraw I have this if and else statement:

PHP Code:

// ...
else if(playertextid == MDC_g_sPlayer[playerid][E_MDC_TEXTDRAW][39])
{
    if(
MDC_g_sPlayer[playerid][E_MDC_LOOK_UP_CACHE] == MDC_LOOK_UP_CACHE_ESSENTIAL)
    {

    }
    else
    {
        
printf("%i"MDC_g_sPlayer[playerid][E_MDC_LOOK_UP_CACHE]); //Prints 1, so it equals to MDC_LOOK_UP_CACHE_ESSENTIAL
        
MDC_Update(playeridMDC_UPDATE_TECHNIQUE_WIPE_CONTENT_MDC_ITEM_LOOK_UPMDC_CONTENT_LICENSE);
    }
    return 
1;
}
//... 

So, the else statement is being called, even though the if above is true. But once I add some code under if code block, else statement isn't getting called. ???

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>