This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
rerere284's profile picture

Error in building maker

Started by rerere284, 03 March 2012 - 10:17 PM
rerere284 #1
Posted 03 March 2012 - 11:17 PM
When I try to run my script BuildSkyScraper, I get

bios:206: [string
"BuildSkyScraper"]:1: '<name>'
expected

BuildSkyScraper:

os.loadAPI.("Buildingparts")
print.("How tall?")
height = read()
Buildingparts.DoorLayer()
turtle.up()
Buildingparts.DoorLayer()
turtle.up()
Buildingparts.CeilingLayer()
Buildingparts.WallLayer()
for i=1, height do
turtle.up()
Buildingparts.WallLayer()
turtle.up()
Buildingparts.WallLayer()
turtle.up()
Buildingparts.CeilingLayer()
Buildingparts.WallLayer()
end
while not turtle.detectDown() do
turtle.down()
end

Buildingparts on pastebin:

http://pastebin.com/p6t6Mt8v
Espen #2
Posted 03 March 2012 - 11:35 PM
Remove the dots infront of the brackets of the first two lines.
It shouldn't be…

os.loadAPI.("Buildingparts")
print.("How tall?")
… but rather…

os.loadAPI("Buildingparts")
print("How tall?")
rerere284 #3
Posted 04 March 2012 - 12:22 AM
Thanks! There were some minor other bugs but it works perfectly now.