SRL Archive - SRL Suggestions

WriteLn in NextPlayer()


Harry

2011-01-19 01:18:28

The WriteLn in NextPlayer():
WriteLn('NextPlayer');

It should be changed to:
WriteLn('NextPlayer('+ToStr(Active)+')');
Or something of that sort (WriteLning the True/False status of the NextPlayer parms). It won't harm anything, and will make more verbose info when switching a player.

Nothing major, but it has annoyed me for a while now.

Wanted

2011-01-19 01:49:37

You're 30 seconds too late, I'll commit tomorrow.

Edit: It's your lucky day, I'll commit it with my lamp fix before bed.

ZephyrsFury

2011-01-19 04:43:59

The same WriteLn has been in SwitchToPlayer for the last 2 years or so (at your own request from memory). And since NextPlayer goes SwitchToPlayer(NextPlayerIndex), you now have the same WriteLn twice pretty much.

Harry

2011-01-19 13:49:35

From: ZephyrsFury
The same WriteLn has been in SwitchToPlayer for the last 2 years or so (at your own request from memory). And since NextPlayer goes SwitchToPlayer(NextPlayerIndex), you now have the same WriteLn twice pretty much.

Shikata ga nai~. Often NextPlayer(False) is called, and then there is no player to SwitchToPlayer, so it is still useful.

Sir R. M8gic1an

2011-01-19 14:10:23

From: Harry
Shikata ga nai~. Often NextPlayer(False) is called, and then there is no player to SwitchToPlayer, so it is still useful.


No it's not, it's only useful in one scenario and in every other scenario it's be adding an unnecessary line to ur debug.

in NextPlayer just put

if NoMorePlayers then writeln(Players[CurrentPlayers].Nick + ' was the last active player');

~RM

Wanted

2011-01-19 14:20:57

What are you guys talking about? The WriteLn is already there, all that is different now is that it tells you whether it was called active or not.

ZephyrsFury

2011-01-20 05:13:35

From: IceFire908
What are you guys talking about? The WriteLn is already there, all that is different now is that it tells you whether it was called active or not.


Which it already did in SwitchToPlayers which NextPlayer calls to switch players. But as Harry mentioned, it only appears when SRL switches players.