Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Very Simple Optimize Max Looping
#3
Lol no the whole point of this was to remove the High_Index crap and all the other codes that tries to find high_index which is pointless because it wastes memory anyway.

this just exits the procedure once theres no players left and requires no extra procedures.

And high index wont work unless no one has logged out since logging in

actually it should be this

Code:
for i = 1 to max_players
    if player(index).name  vbnullstring and z < 3 then
         z = z + 1
    //procedure goes here
   else
         z = 0
   exit for
next i

that would give room for error if there are up to 3 indexs above the first cleared index that are cleared and havent been yet filled (which would probably never happen but you never know Tongue)
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)