Jump to content




How can I fix this


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

#1 theeboris

  • Members
  • 59 posts
  • LocationThe Nethelands

Posted 11 November 2012 - 06:32 AM

This is the code
local paintgui = paintutils.loadImage("/gui/paint")
paintutils.drawImage(paintgui, 0, 0)
term.setCursorPos(24,7)
print("Path")
term.setCursorPos(1,8)
input = io.read()
shell.run("/programs/paint/paint, input")
The error: No such program
/programs/paint/paint exist

#2 Kingdaro

    The Doctor

  • Members
  • 1,636 posts
  • Location'MURICA

Posted 11 November 2012 - 07:06 AM

Two things. The program is actually in /rom/programs/color/paint, and that you haven't separated your arguments for shell.run. Also, you can just run 'paint' without having to type it's full, actual path. The last line should go something like this:
shell.run("paint", "input")


#3 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 11 November 2012 - 07:19 AM

Is it? I seem to recall it being in rom/programs/color/paint for some reason.

#4 Kingdaro

    The Doctor

  • Members
  • 1,636 posts
  • Location'MURICA

Posted 11 November 2012 - 07:23 AM

View PostLyqyd, on 11 November 2012 - 07:19 AM, said:

Is it? I seem to recall it being in rom/programs/color/paint for some reason.
Yep, it's /color/paint, my mistake.

#5 theeboris

  • Members
  • 59 posts
  • LocationThe Nethelands

Posted 12 November 2012 - 02:42 AM

I have now but i get this error: paintstart:7: attempt to index ? (a nil value)
local paintgui = paintutils.loadImage("/gui/paint")
paintutils.drawImage(paintgui, 0, 0)
term.setCursorPos(24,7)
print("Path")
term.setCursorPos(1,8)
input = io.read()
shell.run("paint", "input")


#6 Kingdaro

    The Doctor

  • Members
  • 1,636 posts
  • Location'MURICA

Posted 12 November 2012 - 04:22 AM

I'm not sure if this is it, but you should probably remove the quotes around "input" on the last line.

#7 theeboris

  • Members
  • 59 posts
  • LocationThe Nethelands

Posted 12 November 2012 - 05:07 AM

If I have this I only see 7 when i give a input.
local paintgui = paintutils.loadImage("/gui/paint")
paintutils.drawImage(paintgui, 0, 0)
term.setCursorPos(24,7)
print("Path")
term.setCursorPos(1,8)
input = io.read()
print("7")
shell.run("paint", input)
print("9")






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users