PC-Logix / LanteaCraft

A Stargate-themed mod for Minecraft
http://lanteacraft.com
Other
43 stars 21 forks source link

LC2-22: Stargate computer methods not functioning #449

Closed lieven121 closed 7 years ago

lieven121 commented 7 years ago

Thank you for reporting an issue with LanteaCraft. Please fill out this template when submitting your report - thank you!

Submission checklist

Expected behavior

when I ported form 21 to 22 everything should run fine

Actual behavior

the command works interrupts the program that is running and terminates it

Steps to reproduce

while true do peripheral.call(StargateSIDE,"openIris") sleep(1) peripheral.call(StargateSIDE,"closeIris") sleep(1) end or the reverse

and disengage is also acting weird

System information

AfterLifeLochie commented 7 years ago

You should wrap calls to Stargate peripheral calls (peripheral.call, wrappedPeripheral.openIris, etc) in error handlers, since the Stargate will throw an error if something is wrong. Generally speaking this will be some descriptive useful text.

(You can read about exception handling at http://www.lua.org/manual/5.1/manual.html#2.7)

lieven121 commented 7 years ago

2016-11-21_21 12 30

I tested it like you said but still the same and no error

AfterLifeLochie commented 7 years ago

Can you provide copies of the server log and the LanteaCraft log files?

AfterLifeLochie commented 7 years ago

After re-testing this in a special build using pcall:

You can see that ok is false so an error is occuring in the call (even though it's executing the action). This is the info I needed. 🔢

AfterLifeLochie commented 7 years ago

Resolved in dfad15fb2d962f4b07182616f0a3140ca02da115:

lieven121 commented 7 years ago

thx and sorry for not giving log files / checking this myself I have been busy the last few days but I am happy you found it

AfterLifeLochie commented 7 years ago

No problem. In the event that you can't get computer methods to work and need to open a bug report, use the script I used above (obviously, you can do a more pretty print version if you want; I've shrunk out the spaces to make it fit).