Jump to content




Attempt to index ? a nil value?

lua computer help

3 replies to this topic

#1 Kansas54

  • Members
  • 5 posts
  • LocationMelbourne

Posted 13 January 2017 - 02:08 PM

Here's my code:
http://pastebin.com/XFjh8jUa
The error happens at line 2.
I am clueless. anyone?

#2 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,450 posts

Posted 13 January 2017 - 06:57 PM

Moved to Ask a Pro.

#3 Lupus590

  • Members
  • 1,962 posts
  • LocationUK

Posted 13 January 2017 - 07:14 PM

fs.exists not sf.exists

Edited by Lupus590, 13 January 2017 - 07:14 PM.


#4 Ale32bit

  • Members
  • 71 posts
  • LocationSwitzerland

Posted 13 January 2017 - 09:44 PM

while true do
  local _, side = os.pullEvent("disk")
  if fs.exists(disk.getMountPath(side).."/KANSASBASE") then
	rs.setOutput("back",true)
	sleep(6)
	rs.setOoutput("back",false)
	disk.eject(side)
  end
end

Fixed + optimized

Edited by Ale32bit, 13 January 2017 - 09:47 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users