42 posts
Posted 31 December 2012 - 08:35 AM
Minecraft 1.4.6
I want to use the program Paint on a Monitor but when i try do start it i get the message that there is no path.
I had tried it without a monitor and it works.
Does anyone know how to use it on it ?
Sorry for my bad english i`m german
2447 posts
Posted 31 December 2012 - 09:13 AM
You need to specify the path to the file you're editing. E.g. "monitor paint lol".
42 posts
Posted 31 December 2012 - 09:19 AM
I write a path. I think the problem is that the computer think that the path is the argument
2447 posts
Posted 31 December 2012 - 09:39 AM
Please tell me the exact command you are using and the exact error.
42 posts
Posted 31 December 2012 - 09:42 AM
I type in :
monitor back paint C:
But on the monitor I see Ussage: paint <path>
514 posts
Location
Over there
Posted 31 December 2012 - 10:26 AM
C: is not a valid filen ame, you need to specify the path and the file name e. g. "paint somedir/paint/logo"
27 posts
Posted 31 December 2012 - 10:56 AM
Does not work for a valid path either:
monitor right paint test
creates the same Problem
2447 posts
Posted 31 December 2012 - 11:00 AM
Just typed the exact same thing and had no issue. I have no idea where your issues are coming from.
31 posts
Location
Portugal
Posted 31 December 2012 - 11:16 AM
Can be a problem in ARGS of monitor program… I have the same problem here.
2447 posts
Posted 31 December 2012 - 11:29 AM
I'm using the exact same program as you, typing the exact same things, and I am not getting any issue. So how can it be a problem with the args of the monitor program? As a test, go into the Lua program and type shell.run("monitor", "right", "paint", "lol") and see if that works.
27 posts
Posted 31 December 2012 - 11:29 AM
I did a little bit of testing with the FTB DW20 Modpack
It seams to be an error in the select function. It returns nothing if the first parameter is greater than 1.
Same problem with the MindCrack Modpack
See spoiler for my test.
Spoiler
2447 posts
Posted 31 December 2012 - 11:36 AM
Huh… That's strange. The same thing which works in my dev environment doesn't work in FTB. Will have to investigate further.
Edit:
See the problem. I'm a derp. I somehow thought that coroutine.create accepted varargs after the function to use. D'oh!
Will be fixed in next version of CC - but for the mean time, you can use this replacement monitor program:
function printUsage()
print( "Usage: monitor <side> <program> <arguments>" )
return
end
local tArgs = { ... }
if #tArgs < 2 then
printUsage()
return
end
local sSide = tArgs[1]
if peripheral.getType( sSide ) ~= "monitor" then
print( "No monitor on "..sSide.." side" )
return
end
local sProgram = tArgs[2]
local sPath = shell.resolveProgram( sProgram )
if sPath == nil then
print( "No such program: "..sProgram )
return
end
print( "Running "..sProgram.." on "..sSide.." monitor" )
local monitor = peripheral.wrap( sSide )
term.redirect( monitor )
local args = {...}
local function runProgram()
shell.run( sProgram, select( 3, unpack( args ) ) )
end
local co = coroutine.create(runProgram)
local event = {}
local tFilter = {}
while true do
if event[1] == "monitor_touch" and event[2] == sSide then
os.queueEvent( "mouse_click", 1, unpack( event, 3 ) )
end
local ok, param = coroutine.resume( co, unpack(event) )
if not ok then
term.restore()
error(param)
else
tFilter = param
end
if coroutine.status(co) == "dead" then
break
end
event = { os.pullEventRaw() }
end
term.restore()
Either shove it in the zip in place of the monitor program, or create these new folders in your mod folder - "ComputerCraft/lua/rom/programs" - and then create a file called monitor with those contents. It will then take precedence over the one in the zip.
27 posts
Posted 31 December 2012 - 11:50 AM
I tried it again with the MindCrack Pack, but every mod except MCForge and CC were disabled. But it was the same Problem
2447 posts
Posted 31 December 2012 - 11:54 AM
See above - edited with a solution!
42 posts
Posted 31 December 2012 - 11:57 AM
So there is no fast fix for that problem or ?
8543 posts
Posted 31 December 2012 - 12:01 PM
That is the fast fix.
27 posts
Posted 31 December 2012 - 12:03 PM
YAY it works.
Thanks for the quick fix :)/>
42 posts
Posted 31 December 2012 - 12:13 PM
For me it doesn`t work O.o.
it says [string "monitor"] :3: `<eof>` expected
2447 posts
Posted 31 December 2012 - 12:41 PM
Then you copied it wrong.
524 posts
Location
Cambridge, England
Posted 31 December 2012 - 10:13 PM
Did you test this change when you made it Cloudy? (the one that caused the bug reported here)
2447 posts
Posted 01 January 2013 - 12:51 AM
Did you test this change when you made it Cloudy? (the one that caused the bug reported here)
I did, but either I was working on an old version of the code (which would have been weird as I'd only just changed it) or my test wasn't thorough enough.
Regardless, sorry everyone!