GetPlayers() not working

cryowraith

New Member
Reaction score
7
I saw you wanted team counts as well, then you use GetPlayerTeam() for that to determine which team they are on. The id it returns is actually the team they are on in the lobby.

Furthermore, if there is no player in the slot (computer or human), GetPlayerTeam will return -1.

Er what if the player left during the loading? It returns -1?
 

Nestharus

o-o
Reaction score
84
He wanted to round a real. He didnt say he wanted an integer. It's not the same thing. If he wants an integer it's a simple change.

When you round the result is an int..

Er what if the player left during the loading? It returns -1?

It does ini before the player leaves so slot state and this wouldn't help you : ).
 

saw792

Is known to say things. That is all.
Reaction score
280
When you round the result is an int..
Only when you're rounding to zero decimal places or higher. In fact, let me revise my function to be unnecessarily accurate.
JASS:
function Round takes real input, integer places returns real
  return Pow(10, -places) * I2R(R2I((input * Pow(10, places)) + 0.5))
endfunction
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top