Bios error?
#1
Posted 17 June 2016 - 06:25 PM
bios:190: attempt to compare __lt on nil and number
I just thought this should be brought to the attention of the computercraft buy.
im running Computercraft 1.7.5 for 1.7.10.
thanks
#2
Posted 17 June 2016 - 11:55 PM
Edited by Bomb Bloke, 17 June 2016 - 11:56 PM.
#3
Posted 18 June 2016 - 12:08 AM
As some context on that error: attempt to compare __lt on nil and number
__lt means 'less than comparison', If you take a look at the line Bomb Bloke linked you'd see that it checks to see if the length of the text is greater than the width of the terminal. There is no way for string.len to return nil, so w is nil. You can also determine this by the order it specifies the types, attempt to compare __lt on left hand side and right hand side, and since our operator in use is greater than you just invert the sides.
Edited by theoriginalbit, 18 June 2016 - 12:09 AM.
#4
Posted 18 June 2016 - 12:09 AM
Bomb Bloke, on 17 June 2016 - 11:55 PM, said:
Edit: theoriginalbit beat me, and taught me something while doing so...darn. Didn't realize that it will just flip the error if the error isn't a less than.
Edit 2: Darn, I was too quick to jump to conclusions. I went and looked at the file history, the bios.lua hasn't changed since 1.7.4.
Edited by Selim, 18 June 2016 - 12:13 AM.
#5
Posted 18 June 2016 - 12:14 AM
Selim, on 18 June 2016 - 12:09 AM, said:
#7
Posted 18 June 2016 - 12:17 AM
By the way, is it just me or is file history unnecessarily complex to navigate under Github? As opposed to, say, the SVNs of yore? There seems to be no way to get a page listing all versions of a specific file, without any unassociated rubbish.
Edited by Bomb Bloke, 18 June 2016 - 12:19 AM.
#8
Posted 18 June 2016 - 12:28 AM
Bomb Bloke, on 18 June 2016 - 12:17 AM, said:
#9
Posted 18 June 2016 - 12:35 AM
Never understood how Git managed to take over. Back when it started to become popular, I installed the relevant software and found it to be an unreliable mess (working with XBMC, mind you, a project with about a gig worth of source files at the time). Years later XKCD comes out with this, suggesting that absolutely nothing's changed.
#10
Posted 18 June 2016 - 12:52 AM
Bomb Bloke, on 18 June 2016 - 12:35 AM, said:
Anyway, lets stop derailing this topic.
#11
Posted 19 June 2016 - 07:04 AM
if I dont redirect the term on peripheral_detach and arg1 is "monitor" then thats the error I get.
on first responder, it was wrapped via a redirect as explained on the wiki
local mon = peripheral.find("monitor")
local oldTerm = term.redirect(mon)
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users