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

bios:338: [string "startup"]:8: ')' expected

Started by billbertking1, 22 July 2013 - 09:42 AM
billbertking1 #1
Posted 22 July 2013 - 11:42 AM
what does it mean when i get "bios:338: [string "startup"]:8: ')' expected"?
i don't understand at all what that means and i get it ALLOT. i need the help
Cranium #2
Posted 22 July 2013 - 12:20 PM
Split to new topic.

I would like to let you know, that since you are now in the 'Members' group, you are able to create your own topics. This was about ten posts ago.

Also, without seeing your code, it's hard to tell what you are erroring at.
"bios:338: [string "startup"]:8: ')' expected" meansd that on line 8, the program expected a closing parenthesis ')', but none was given.
Try taking a look at Advert's Codex of Error Slaying to learn more about the error messages thrown in the computercraft bios.
billbertking1 #3
Posted 22 July 2013 - 12:36 PM
ok heres the code


local mon = peripheral.wrap("back")
mon.setTextScale(1)
mon.setTextColor(colors.black)
local button={}
mon.setBackgroundColors(colors.white)

function printMessage(message)
__.print(Running Program: button)
end

later on im going to add the "shell.run("button")", but the first part wont work at all
Tjakka5 #4
Posted 22 July 2013 - 12:49 PM
You need to do


print("Running program" ..button)
The "Running program" part is a string, so it needs to be in brackets.
The button is a variable, so you need to do ..button


Hope that helps.
Also, its going to do attemt to call nill as button is not defined as anything… and its a table.
EDIT: And, if you want to run it on the monitor you need to do mon.write("Running program" ..button)
billbertking1 #5
Posted 22 July 2013 - 12:49 PM
Cool thanks

but how do i get it to run the program "button"?