Blockland Forums > Modification Help
Teleporting self to a random player with light key
Port:
--- Quote from: Slicksilver on February 17, 2012, 07:37:20 PM ---
--- Code: --- for(%i = 1; %i < clientGroup.getCount(); %i++)
--- End code ---
--- End quote ---
Wouldn't this cause it to never target the first player on the server?
Actually, nevermind:
--- Quote from: Slicksilver on February 17, 2012, 07:37:20 PM ---
--- Code: --- %randomplr = getRandom(0,clientGroup.getCount()); // Get a random number corresponding to a client.
-snip-
%randomplr = (%randomplr + 1) % clientGroup.getCount();
--- End code ---
--- End quote ---
Slicksilver:
--- Quote from: YourBuddyBill on February 17, 2012, 08:56:30 PM ---Well, new problem, now I'm getting syntax errors.
Why is this a syntax error?
--- End quote ---
I missed a closing bracket about half way through. Fixed.