Jump to content




Program Closes with no error


  • You cannot reply to this topic
3 replies to this topic

#1 Hayden_Almeida

  • Members
  • 49 posts

Posted 01 May 2016 - 02:22 AM

My program is closing with no error and no print messages i put:

if fs.exists("disk/usuario") then
print("Debug 1")
    local ab = fs.open("disk/usuario", "r")
    Gerente = ab.readLine()
    ab.close()
    local passou = false
    local passou2 = false
    Disco_ID = disk.getID(diskDriveSide)
    print("Debug 2")
    sleep(1)
print("Debug 3")
else
    print("debug 4")
end

The program only opens and closes. Only the DEBUGs: 1 and 2 are printed in the screen, the DEBUG 3 not. So the problem is in the function "sleep(1)" ??

#2 Dog

  • Members
  • 1,179 posts
  • LocationEarth orbit

Posted 01 May 2016 - 02:36 AM

I'm a bit surprised it doesn't error before Debug 2. Where is diskDriveSide defined?

#3 Hayden_Almeida

  • Members
  • 49 posts

Posted 01 May 2016 - 02:38 AM

View PostDog, on 01 May 2016 - 02:36 AM, said:

I'm a bit surprised it doesn't error before Debug 2. Where is diskDriveSide defined?

local file = fs.open("configs/start", "r")
local ler1 = file.readLine()
local ler2 = file.readLine()
file.close()
diskDriveSide = tostring(ler1)

Edited by Hayden_Almeida, 01 May 2016 - 02:39 AM.


#4 Dog

  • Members
  • 1,179 posts
  • LocationEarth orbit

Posted 01 May 2016 - 02:40 AM

Please post your entire code, or if it is large post it to pastebin and put a link here.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users