Code Optimization
#4

Quote:
Originally Posted by TomTroX
Посмотреть сообщение
if( .. || .. || .. )
{
}
Give me an example please?

Quote:
Originally Posted by BuuGhost
Посмотреть сообщение
it will work like that, and generally will be easy to see what is done.

Although it may be better to use
pawn Код:
if(value > 2000) {
  if(!IsPlayerAdmin && AdminLevel[playerid] == 0) {
     BanEx(playerid, "cashhacking");
  }
}
Just for the example of it, sometimes multiple if's are better than combining them, sometimes they're not.
You haven't seen the script , they are like 10 if statments into each other.
Reply


Messages In This Thread
Code Optimization - by CoDeZ - 04.07.2012, 07:54
Re: Code Optimization - by TomTroX - 04.07.2012, 07:55
Re: Code Optimization - by Revo - 04.07.2012, 07:57
Re: Code Optimization - by CoDeZ - 04.07.2012, 08:02
Re: Code Optimization - by ReneG - 04.07.2012, 08:25
Re: Code Optimization - by [MM]RoXoR[FS] - 04.07.2012, 09:50
Re: Code Optimization - by Vince - 04.07.2012, 09:59
Re: Code Optimization - by CoDeZ - 04.07.2012, 11:34
Re: Code Optimization - by ikey07 - 04.07.2012, 11:40
Re: Code Optimization - by CoDeZ - 04.07.2012, 11:42

Forum Jump:


Users browsing this thread: 1 Guest(s)