Code gets rolled back.



  • Twice in the past 2 days I have written code via the browser and then left the game. When I came back and re-connected and opened the script window, my code had been rolled back.

    Another user reported this earlier today as well so I'm not the only one experiencing this.

    *edit* Someone also brought up some funkiness with using a separate window for the script editor, so that may be related.



  • I experienced this in the following scenario:

    Having multiple script tabs open (happens often with detached window) and writing & saving in the one console. After that, writing in the other console might delete your previous changes.

    Having World and PTR open simultaneously will have the same effect although it's different servers.



  • I don't have PTR open, but it is possible I had a 2nd script window open.

    However, I definitely didn't save in the other window... it may have still been open when I re-opened the game, though. Is it possible that could cause it?

    Either way, I figure it's probably a glitch the devs want to figure out... I'll see if I can reproduce it.

    *edit* I'm not sure if it has been patched or something already, but I can't even get a second script window to come up anymore.



  • Opening the separate window can also overwrite the code for the second player in the simulation mode.


  • Dev Team

    It would help a lot if you manage to find out how to reproduce this issue. Otherwise it is very hard to say something based on such little information.



  • 1. Open Simulator mode in Custom mode.

    2. Select player 1, write `let this_is_player1` and save.

    3. Select player 2, write `let this_is_player2` and save.

    So far, so good.

    Now, with player 2 active, open the extra window. Player 2's code now reads `let this_is_player_1`.

    (By the way, it would be much better if I could set Player 2 to run an explicit branch. Now it's a tiring copy-paste job.)



  • Code rollback happend to me a bunch of times when using the detached editor, can't really tell how to reproduce though



  • So one easy to reproduce scenario:

    1. Navigate from your main branch to any other branch
    2. Click back to your main branch

    Code is now reverted to the branch you moved to.

    *edit -- This only happens when in a separate window for the script window. It does not happen if you're using the connected one -- end edit*

    Still haven't been able to reproduce the other one, but I wouldn't have thought toggling through branches would have any possibility of overwriting your main branch without an explicit option to do so.


  • Dev Team

    There was a bug with floating window introduced in the recent patch. Thanks for reporting, fixed now, please confirm.



  • The issue I just outlined has been fixed, but since I have yet to be able to reproduce the initial issue I posted, I can't confirm it fixed that.



  • can't really confirm nor deny atm, but I wanna highlight that the issue I had with code rollbacks, I've had for months now, occasionally; not just since the latest patch. Since I use an external editor wth grunt-screeps for a while now I can't really say much about the current situation.