AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Off-Topic (https://forums.alliedmods.net/forumdisplay.php?f=15)
-   -   The perfect if else statement doesn’t exis.. (https://forums.alliedmods.net/showthread.php?t=344657)

EFFx 12-03-2023 11:07

Re: The perfect if else statement doesn’t exis..
 
You should know what each function does since you were the one that built it, that is why writing an easy-to-read code is important. The size of the code is defined by the project itself and should not matter anyway.

Trying to make the code easy to understand in case you get lost (or even if you are in a project involved by multiple people) is what will help you fix the wrong syntaxes, calculations and parameters you accidentally missed.

SHIELD755 12-07-2023 21:42

Re: The perfect if else statement doesn’t exis..
 
]
PHP Code:

if(something)
{
     
// works
     
return;
}

// not works 


+ARUKARI- 12-07-2023 23:30

Re: The perfect if else statement doesn’t exis..
 
PHP Code:

if (error_1)
{
    
// not works.
    // something msg.
    
return;
}
if (
error_2)
{
    
// not works.
    // something msg.
    
return;
}
if (
error_3)
{
    
// not works.
    // something msg.
    
return;
}

// works. 



All times are GMT -4. The time now is 00:55.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.