Jump to content




Bios error?


10 replies to this topic

#1 RedWolfie

  • Members
  • 9 posts
  • LocationUSA

Posted 17 June 2016 - 06:25 PM

i got this error when I broke the monitor while it was wrapped while os.pullEvent()

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 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 17 June 2016 - 11:55 PM

Just "wrapped", or "redirected to"...? The line in context suggests that you rigged things so that the system would try to write to the disconnected display.

Edited by Bomb Bloke, 17 June 2016 - 11:56 PM.


#3 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 18 June 2016 - 12:08 AM

Damn, Bomb you beat me, now to rewrite slightly.

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 Selim

  • Members
  • 189 posts
  • LocationHiding in Online Storage

Posted 18 June 2016 - 12:09 AM

View PostBomb Bloke, on 17 June 2016 - 11:55 PM, said:

Just "wrapped", or "redirected to"...? The line in context suggests that you rigged things so that the system would try to write to the disconnected display.
Isn't that the wrong bios.lua file anyways? The one in the repo will be for the latest CC, and he is using 1.7.5. Plus, doesn't "_lt" mean "less than"? The line it is pointing out doesn't use a less than, only a greater than. I'm pretty sure that is the wrong file.

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 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 18 June 2016 - 12:14 AM

View PostSelim, on 18 June 2016 - 12:09 AM, said:

Isn't that the wrong bios.lua file anyways? The one in the repo will be for the latest CC, and he is using 1.7.5.
That's the correct bios.lua file. There are tags on the repo for the different CC versions. If you look at the URL its on a particular blob (2578a654b038c998bca3241b8638d8683c6423ef) which is the 1.75 version of CC.

#6 Selim

  • Members
  • 189 posts
  • LocationHiding in Online Storage

Posted 18 June 2016 - 12:17 AM

View Posttheoriginalbit, on 18 June 2016 - 12:14 AM, said:

--snip--
Thank explains why the file hasn't changed...I thought it did, thanks for the clarification there.

#7 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 18 June 2016 - 12:17 AM

Indeed. The latest version of bios.lua was changed by the latest CC update, 1.79.

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 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 18 June 2016 - 12:28 AM

View PostBomb Bloke, on 18 June 2016 - 12:17 AM, said:

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.
You can do it in Git with git log -p file, but GitHub doesn't have a way to do so.

#9 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 18 June 2016 - 12:35 AM

Ugh. Well that explains why I couldn't figure it out.

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 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 18 June 2016 - 12:52 AM

View PostBomb Bloke, on 18 June 2016 - 12:35 AM, said:

Never understood how Git managed to take over.
The main reason Git took over is because it’s incredibly fast, very efficient with large projects, and it has an amazing branching system; which is great for software teams, particularly those with many developers. I would suggest reading Chapter 1 of the Pro Git book, it explains the benefits of Git over other VCSs and how it achieves the benefits. Might help with understanding Git.

Anyway, lets stop derailing this topic.

#11 RedWolfie

  • Members
  • 9 posts
  • LocationUSA

Posted 19 June 2016 - 07:04 AM

I solved the issue by doing a term.redirect to stored table of previous term on an event pull.
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