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

Bios:366: .[string."Hello"]:6: .'<name>'.expected error

Started by Tatters, 21 January 2015 - 11:35 PM
Tatters #1
Posted 22 January 2015 - 12:35 AM
I've been attempting to run the following code through a monitor as a display message:

mon = peripheral.wrap("left")
mon.clear()
mon.setTextScale(3)
mon.setCursorPos(1,1)
mon.setTextColour(colours.pink)
mon.write("Welcome to Rosewood")

However, I get the following error: Bios:366: .[string."Hello"]:6: .'<name>'.expected error. Could someone explain whats wrong?
Bomb Bloke #2
Posted 22 January 2015 - 01:49 AM
Usually that error means you're trying to use an invalid term as a variable - for example, a reserved keyword ("for", "return", etc), or something that begins with a numeral instead of a letter.

However, you don't appear to be doing that here. Make sure that the code you've posted here exactly matches the code in the file you're actually trying to run.
Edited on 22 January 2015 - 12:49 AM
Tatters #3
Posted 23 January 2015 - 06:53 AM
I am certain this is correct, and have uploaded the pastebin here: http://pastebin.com/RrqHEs9E
Lyqyd #4
Posted 23 January 2015 - 07:04 AM
You've got a period at the end of the last line.
Tatters #5
Posted 23 January 2015 - 07:09 AM
Brilliant, thank you.