What the hell is the error? I just get a infinite loop when using this.
You'd probably understand a lot more about your code if you didn't squeeze it together in such a highly concentrated way.
There's a problem when nobody, including you, can read your code.
Let me dilute it into pseudocode so I can understand it.
Loop While...
- ServerConnect(#) is not an object, or
- the Object is not of specified class, or
- it's not close enough, and
- we're still in the range of the group.
Okay, after doing that I understand what the issue is.
if(%cond1 || %cond2 || %cond3 && %cond4)is the same as
if(%cond1 || %cond2 || (%cond3 && %cond4))That's doing it wrong. I explained this in one of my guides.
Here's the fix:
if((%cond1 || %cond2 || %cond3) && %cond4) while(((!isObject(%obj = serverconnection.getobject($radiusID))
|| %obj.getclassname() !$= $radiusCl
|| vectorSub($radiusPos, %obj.getPosition()) > $radiusRad))
&& $radiusID < serverConnection.getCount() - 1)
$radiusID++;