ScriptCraft icon indicating copy to clipboard operation
ScriptCraft copied to clipboard

arrows signs are not active after a server restart

Open carlrobert opened this issue 10 years ago • 3 comments

  1. Create a sign.

  2. Look at it and do arrows.sign()

  3. Click the sign and try shooting an arrow. Works as expected.

  4. Stop the server.

  5. Restart the server. Error message: [20:12:35] [ScriptCraft] [ERROR]: Plugin C:/Local Data/rs/CanaryMod/scriptcraft/ plugins/arrows.js Error: Error executing module C:/Local Data/rs/CanaryMod/scrip tcraft/plugins/arrows.js line #195 : Cannot get property "constructor" of null undefined

    undefined

  6. In the prompt, /js arrows does not tab complete since the arrows module is not loaded.

signs-store.json quoted below as per step 4.

{ "menus": { "Arrow": [ null, null ], "Dinner": [], "Time": [] } }

CanaryMod 1.2.0, ScriptCraft 3.1.3. Reproducible on different Windows installations.

carlrobert avatar Apr 24 '15 06:04 carlrobert

After fixing the "constructor" spelling (https://github.com/walterhiggins/ScriptCraft/pull/232), there is no error message and arrows loads as expected. However, after a restart, the sign is not an arrows sign any more. So, right now the failing test case is as follows:

  1. Create a sign.
  2. Look at it and do arrows.sign()
  3. Click the sign and try shooting an arrow. Works as expected.
  4. Stop the server.
  5. Restart the server.
  6. Retry step 3 and nothing happens; the sign doesn't react. Expected outcome. same as step 3.

carlrobert avatar May 05 '15 20:05 carlrobert

According to signs/menu.js, it looks like signs should be persistent.

Also, doing arrows.sign() gives a JSON printout in the chat which wasn't there in previous versions, I believe.

carlrobert avatar May 07 '15 20:05 carlrobert

Hi Carl, I tried reproducing this with SpigotMC 1.10 and could not reproduce the issue. Are you using CanaryMod or SpigotMC?

walterhiggins avatar Dec 20 '16 17:12 walterhiggins