Posted 17 January 2016 - 04:54 PM
I have a Problem at Time i write a Bios for computercraft and i dont know where the problem is i get the error "startup:295: Expected String"
os.pullEvent = os.pullEventRaw
term.setTextColor(colors.white)
term.clear()
local StFile = nil
local filePath = "system32/kernel/bos/startup"
local fileHandle = fs.open(filePath, 'r')
StFile = textutils.unserialize (fileHandle.readLine(1))
fileHandle.close()
function PKey() --Bootmenu Key
while true do
local event, key = os.pullEventRaw("key")
if key == keys.f12 then
shell.run("system32/kernel/bos/bios")
break
end
end
end
function PInfo() --Prints the Text
-------------
--Erste Zeile
-------------
term.setCursorPos(1,1)
print("_")
sleep(0.1)
term.setCursorPos(1,1)
print(" ")
sleep(0.1)
term.setCursorPos(1,1)
print("_")
sleep(0.1)
term.setCursorPos(1,1)
print(" ")
sleep(0.1)
term.setCursorPos(1,1)
print("_")
sleep(0.1)
term.setCursorPos(1,1)
textutils.slowPrint("CCW-Bios v1.0 press F12 to enter Bootmenu")
sleep(0.1)
term.setCursorPos(42,1)
print("_")
sleep(0.1)
term.setCursorPos(42,1)
print(" ")
sleep(0.1)
term.setCursorPos(42,1)
print("_")
sleep(0.1)
term.setCursorPos(42,1)
print(" ")
sleep(0.1)
term.setCursorPos(42,1)
print("_")
sleep(0.1)
term.setCursorPos(42,1)
print(" ")
--------------
--Zweite Zeile
--------------
term.setCursorPos(1,2)
print("_")
sleep(0.1)
term.setCursorPos(1,2)
print(" ")
sleep(0.1)
term.setCursorPos(1,2)
print("_")
sleep(0.1)
term.setCursorPos(1,2)
print(" ")
sleep(0.1)
term.setCursorPos(1,2)
print("_")
sleep(0.1)
term.setCursorPos(1,2)
textutils.slowPrint("© by Killah1312 2012-2016")
sleep(0.1)
term.setCursorPos(26,2)
print("_")
sleep(0.1)
term.setCursorPos(26,2)
print(" ")
sleep(0.1)
term.setCursorPos(26,2)
print("_")
sleep(0.1)
term.setCursorPos(26,2)
print(" ")
sleep(0.1)
term.setCursorPos(26,2)
print("_")
sleep(0.1)
term.setCursorPos(26,2)
print(" ")
--------------
--Dritte Zeile
--------------
term.setCursorPos(1,4)
print("_")
sleep(0.1)
term.setCursorPos(1,4)
print(" ")
sleep(0.1)
term.setCursorPos(1,4)
print("_")
sleep(0.1)
term.setCursorPos(1,4)
print(" ")
sleep(0.1)
term.setCursorPos(1,4)
print("_")
sleep(0.1)
term.setCursorPos(1,4)
textutils.slowPrint("MC Dual-Core CPU X7223 @1.5GHz")
sleep(0.1)
term.setCursorPos(31,4)
print("_")
sleep(0.1)
term.setCursorPos(31,4)
print(" ")
sleep(0.1)
term.setCursorPos(31,4)
print("_")
sleep(0.1)
term.setCursorPos(31,4)
print(" ")
sleep(0.1)
term.setCursorPos(31,4)
print("_")
sleep(0.1)
term.setCursorPos(31,4)
print(" ")
--------------
--Vierte Zeile
--------------
term.setCursorPos(1,5)
print("_")
sleep(0.1)
term.setCursorPos(1,5)
print(" ")
sleep(0.1)
term.setCursorPos(1,5)
print("_")
sleep(0.1)
term.setCursorPos(1,5)
print(" ")
sleep(0.1)
term.setCursorPos(1,5)
print("_")
sleep(0.1)
term.setCursorPos(1,5)
textutils.slowPrint("DDR3 1600MHz VRAM94866 4096MB")
sleep(0.1)
term.setCursorPos(30,5)
print("_")
sleep(0.1)
term.setCursorPos(30,5)
print(" ")
sleep(0.1)
term.setCursorPos(30,5)
print("_")
sleep(0.1)
term.setCursorPos(30,5)
print(" ")
sleep(0.1)
term.setCursorPos(30,5)
print("_")
sleep(0.1)
term.setCursorPos(30,5)
print(" ")
--------------
--Fünfte Zeile
--------------
term.setCursorPos(1,6)
print("_")
sleep(0.1)
term.setCursorPos(1,6)
print(" ")
sleep(0.1)
term.setCursorPos(1,6)
print("_")
sleep(0.1)
term.setCursorPos(1,6)
print(" ")
sleep(0.1)
term.setCursorPos(1,6)
print("_")
sleep(0.1)
term.setCursorPos(1,6)
textutils.slowPrint("SH37941005 Sata600 HDD Detected")
sleep(0.1)
term.setCursorPos(32,6)
print("_")
sleep(0.1)
term.setCursorPos(32,6)
print(" ")
sleep(0.1)
term.setCursorPos(32,6)
print("_")
sleep(0.1)
term.setCursorPos(32,6)
print(" ")
sleep(0.1)
term.setCursorPos(32,6)
print("_")
sleep(0.1)
term.setCursorPos(32,6)
print(" ")
---------------
--Sechste Zeile
---------------
term.setCursorPos(1,8)
print("_")
sleep(0.1)
term.setCursorPos(1,8)
print(" ")
sleep(0.1)
term.setCursorPos(1,8)
print("_")
sleep(0.1)
term.setCursorPos(1,8)
print(" ")
sleep(0.1)
term.setCursorPos(1,8)
print("_")
sleep(0.1)
term.setCursorPos(1,8)
textutils.slowPrint("Loading PXE-Networkboot Agent...")
sleep(0.1)
term.setCursorPos(33,8)
print("_")
sleep(0.1)
term.setCursorPos(33,8)
print(" ")
sleep(0.1)
term.setCursorPos(33,8)
print("_")
sleep(0.1)
term.setCursorPos(33,8)
print(" ")
sleep(0.1)
term.setCursorPos(33,8)
print("_")
sleep(0.1)
term.setCursorPos(33,8)
print(" ")
sleep(1)
--------------
--Siebte Zeile
--------------
term.setCursorPos(1,9)
print("_")
sleep(0.1)
term.setCursorPos(1,9)
print(" ")
sleep(0.1)
term.setCursorPos(1,9)
print("_")
sleep(0.1)
term.setCursorPos(1,9)
print(" ")
sleep(0.1)
term.setCursorPos(1,9)
print("_")
sleep(0.1)
term.setCursorPos(1,9)
textutils.slowPrint("Exeting PXE-Networkboot Agent...")
sleep(0.1)
term.setCursorPos(33,9)
print("_")
sleep(0.1)
term.setCursorPos(33,9)
print(" ")
sleep(0.1)
term.setCursorPos(33,9)
print("_")
sleep(0.1)
term.setCursorPos(33,9)
print(" ")
sleep(0.1)
term.setCursorPos(33,9)
print("_")
sleep(0.1)
term.setCursorPos(33,9)
print(" ")
sleep(1)
end
parallel.waitForAny(PKey, PInfo)
if fs.exists(StFile) then
term.clear()
shell.run(StFile)
else
term.setCursorPos(1,11)
print("_")
sleep(0.1)
term.setCursorPos(1,11)
print(" ")
sleep(0.1)
term.setCursorPos(1,11)
print("_")
sleep(0.1)
term.setCursorPos(1,11)
print(" ")
sleep(0.1)
term.setCursorPos(1,11)
print("_")
sleep(0.1)
term.setCursorPos(1,11)
textutils.slowPrint("No Bootable System found! Enter Bootmenu to set it!")
PKey()
end
Can someone help me?