This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
FuuuAInfiniteLoop(F.A.I.L)'s profile picture

Help with code

Started by FuuuAInfiniteLoop(F.A.I.L), 28 November 2012 - 05:15 AM
FuuuAInfiniteLoop(F.A.I.L) #1
Posted 28 November 2012 - 06:15 AM
Im making a gaming console emu but when i trying to run a file it simplely go to the shell

i cant fix the bug

the code is on pastebin

can you tell me the errors or fix them

http://pastebin.com/ZPXgYmD0

M
DmCDm
D

M = modem
D = disk drive or games
Dm = disks drives for memories
C = computer


thanks
Sammich Lord #2
Posted 28 November 2012 - 07:18 AM
You can't hand us 476 lines of code and expect us to act like a Lua compiler and tell you all the errors. Give us the error you get and we will know what to look for.
KaoS #3
Posted 28 November 2012 - 07:31 AM
it doesn't error, it just acts like you launched shell I think, could you give us a screen shot of just before you run the code and the output afterwards?
Orwell #4
Posted 28 November 2012 - 07:32 AM
Are you sure that the file '/disk/movie' or '/disk/game' exists? How can you be sure that those are mounted on '/disk' and not '/disk2'? By inserting them one by one?
FuuuAInfiniteLoop(F.A.I.L) #5
Posted 28 November 2012 - 08:21 AM
Are you sure that the file '/disk/movie' or '/disk/game' exists? How can you be sure that those are mounted on '/disk' and not '/disk2'? By inserting them one by one?
i read the boot order in bios.lua and the error is that it doesnt read the file, it goes to the shell directly
Orwell #6
Posted 28 November 2012 - 02:14 PM
Try these line to prompt you if the file doesn't exist:

if not (fs.exists('/disk/movie') or fs.exists('/disk/game')) then
  error("No movie/game found!")
end
Add that add the end or something. If it gives you that error, than you should definitely check if the file exists/ if your looking at the right spot. (disk.getMountPath() is a good hint ;)/>)