2 posts
Posted 31 August 2012 - 01:37 PM
Ive tried to make my monitor run a program,
its simply is
monitor left husk
and the program husk is simply
print ("Remember to log off!")
and i get this error
bios:206: [string "test"]:1: "=" expected
Anyone knows what to do?
1688 posts
Location
'MURICA
Posted 31 August 2012 - 02:52 PM
This problem is usually caused by trying to call a function without parentheses, or simply stating a word without doing anything else with it.
var
^will cause an error.
2 posts
Posted 31 August 2012 - 05:38 PM
Clueless what do you mean? Im a real noob..
1243 posts
Location
Indiana, United States
Posted 31 August 2012 - 08:53 PM
Clueless is a title; Kingdaro is his name, as tiin57 is mine.
212 posts
Location
Dallas, Tx
Posted 31 August 2012 - 09:26 PM
try this. i have a variable declared before the program runs and an array of all the sides of the computer. this will scan for a monitor and if one is found it wraps it and prints on the screen "Remember to log off"
the reason this scans for a monitor is so that all you need to do is run your program instead of typing 'monitor right test' you just type 'test' and it does everything you need for you
hope this solves your problem! =)
MON = ""
Csides = {"left", "right", "top", "bottom", "back"}
for i = 1, 5 do
if peripheral.isPresent(Csides[i]) then
if peripheral.getType(Csides[i]) == "monitor" then
MON = peripheral.wrap(Csides[i])
MON.write("Remember to Log off!!")
end
end
end
73 posts
Location
Yes
Posted 31 August 2012 - 09:58 PM
I think you have a space between your print and the (). you don't want a space.