Posted 30 March 2013 - 02:25 PM
Hello.
(This is the startup file it gives you in the server side minecraft/mods/rom/lua/startup)
+ For the note it worked fine before i added that one line
So i was playing on my server earlier and i simply added 1 small line to this program
Whats going on!?
(This is the startup file it gives you in the server side minecraft/mods/rom/lua/startup)
+ For the note it worked fine before i added that one line
So i was playing on my server earlier and i simply added 1 small line to this program
local sPath = ".:/rom/programs"
if turtle then
sPath = sPath..":/rom/programs/turtle"
else
sPath = sPath..":/rom/programs/computer"
function wait(seconds, event)
local waitdelay = os.startTimer(seconds)
local chk, p1, p2, p3;
repeat chk, p1, p2, p3 = os.pullEvent() until (event ~= nil and chk == event) or (chk == "timer" and p1 == waitdelay)
return chk, p1, p2, p3
end
function wait(seconds, event)
local waitdelay = os.startTimer(seconds)
local chk, p1, p2, p3;
repeat chk, p1, p2, p3 = os.pullEvent() until (event ~= nil and chk == event) or (chk == "timer" and p1 == waitdelay)
return chk, p1, p2, p3
end
term.clear()
term.setCursorPos(1,1)
print(“Current OS: HolcombesHostOS 0.9")
print("This computers ID id: " .. os.getComputerID())
print("------------------------")
-- Height, 18
-- Width, 50
end
if http then
sPath = sPath..":/rom/programs/http"
end
shell.setPath( sPath )
help.setPath( "/rom/help" )
shell.setAlias( "ls", "list" )
shell.setAlias( "dir", "list" )
shell.setAlias( "cp", "copy" )
shell.setAlias( "mv", "move" )
shell.setAlias( "rm", "delete" )
if fs.exists( "/rom/autorun" ) and fs.isDir( "/rom/autorun" ) then
local tFiles = fs.list( "/rom/autorun" )
table.sort( tFiles )
for n, sFile in ipairs( tFiles ) do
if string.sub( sFile, 1, 1 ) ~= "." then
local sPath = "/rom/autorun/"..sFile
if not fs.isDir( sPath ) then
shell.run( sPath )
end
end
end
end
And to that i added
local time = os.time()
time = textutils.formatTime(time, false)
print("The time is "..time)
and it gives me the error
bios:206: [string "startup"]:21: unexpected symbol
so i restarted the startup file to the one it gives you and did this
local sPath = ".:/rom/programs"
if turtle then
sPath = sPath..":/rom/programs/turtle"
else
sPath = sPath..":/rom/programs/computer"
print("Test")
end
if http then
sPath = sPath..":/rom/programs/http"
end
shell.setPath( sPath )
help.setPath( "/rom/help" )
shell.setAlias( "ls", "list" )
shell.setAlias( "dir", "list" )
shell.setAlias( "cp", "copy" )
shell.setAlias( "mv", "move" )
shell.setAlias( "rm", "delete" )
if fs.exists( "/rom/autorun" ) and fs.isDir( "/rom/autorun" ) then
local tFiles = fs.list( "/rom/autorun" )
table.sort( tFiles )
for n, sFile in ipairs( tFiles ) do
if string.sub( sFile, 1, 1 ) ~= "." then
local sPath = "/rom/autorun/"..sFile
if not fs.isDir( sPath ) then
shell.run( sPath )
end
end
end
end
It gave me the same error so i ran it as the default without the test and it worked?Whats going on!?