Look at this code, if you would. When the code is executed, it prints "Number is...", but doesn't print the number of players, which should be x. It seems like GetNumPlayers() isn't working. And I notice that it's missing from the JK Specs (Millennium is down).
I need this code to make sure that no players are still in the sector before executing another piece of code. But it always thinks a player is still in the sector, even if no one is.
I need this code to make sure that no players are still in the sector before executing another piece of code. But it always thinks a player is still in the sector, even if no one is.
Code:
exited: print("Someone exited sector."); // Make sure there are no other players in the sector for (x=0; x<GetNumPlayers(); x=x+1) { print("Number is..."); print(x); print("Checking players' sectors..."); if (GetThingSector(GetPlayerThing(x)) == theSector) { print("Someone is still in the sector. Not resetting."); return; } } print("No one else in the sector. Resetting.");
KOP_blujay
Just dancin'...and singin'...in the Force.
Just dancin'...and singin'...in the Force.