I'm having real difficulties making this program run properly. Whenever I run it, it just silently fails. It outputs "batbox_6" on the monitor, but then the program stops without doing anything else. There is no error message at all.
Pastebin link: http://pastebin.com/jW98THPm
I just want to note that I am in no way a good coder. I have been following a few guides to make this work, but I do understand most of it.
Program Silently Failing
Started by Brekkjern, Nov 16 2013 10:13 PM
2 replies to this topic
#1
Posted 16 November 2013 - 10:13 PM
#2
Posted 16 November 2013 - 11:21 PM
Does it return to the command prompt, or just stall?
Directly after writing the batbox's name, it should process line 61:
Not 100% sure, but I don't believe you can use escape characters with mon.write(). At least, I gather they don't work with term.write(), which should be much the same thing.
self.getStored() doesn't return anything, so what I'd expect to happen is an "attempt to concatenate nil and string" error. Not sure why you're not seeing an error appear; I suppose fix that and see what the result is?
Directly after writing the batbox's name, it should process line 61:
mon.write("\n\tEU: "..self.getStored().." / "..self.getCapacity()..". "..self.getPercent().."\%\n")
Not 100% sure, but I don't believe you can use escape characters with mon.write(). At least, I gather they don't work with term.write(), which should be much the same thing.
self.getStored() doesn't return anything, so what I'd expect to happen is an "attempt to concatenate nil and string" error. Not sure why you're not seeing an error appear; I suppose fix that and see what the result is?
#3
Posted 16 November 2013 - 11:36 PM
Quote
Does it return to the command prompt, or just stall?
Quote
self.getStored() doesn't return anything, so what I'd expect to happen is an "attempt to concatenate nil and string" error. Not sure why you're not seeing an error appear; I suppose fix that and see what the result is?
I made it into a variable to do some checks on it to see why it didn't work and forgot to make it return again...
As for the mon.write() not working with escape characters, you are right. I guess I have to find a way around it.
Edited by Brekkjern, 16 November 2013 - 11:42 PM.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











