Posted 12 April 2014 - 02:51 AM
I've been working on a simple custom shell lately, however I get a BIOS error when I try to verify that the file being executed by the user actually exists. The error appears to be occurring around line 170 (at fs.exists())
Here's a link to the full program: http://pastebin.com/styTtmzH
bios:364 is the part of loadfile() that calls fs.open(), so I presume the error means fs.open() did not receive a string as its first argument (the file name). However, I've checked with type() to assure that v and file (the arguments being passed to fs.exists()) are both strings.
It's been a while since I've done much with Lua, as I'm currently in the process of learning Java, so any help or advice would be appreciated. Thanks!
Here's a link to the full program: http://pastebin.com/styTtmzH
bios:364 is the part of loadfile() that calls fs.open(), so I presume the error means fs.open() did not receive a string as its first argument (the file name). However, I've checked with type() to assure that v and file (the arguments being passed to fs.exists()) are both strings.
It's been a while since I've done much with Lua, as I'm currently in the process of learning Java, so any help or advice would be appreciated. Thanks!
Edited on 12 April 2014 - 03:45 PM