Jump to content




[error] bios:466: Expected String?


  • You cannot reply to this topic
2 replies to this topic

#1 SNWLeader

  • Members
  • 71 posts
  • LocationTampa Bay, Florida

Posted 05 February 2013 - 02:19 PM

I am trying to make a touchscreen shop and this error comes up for me and I do not what to do with it. This error really does not tell me which line the error is on or anything

bios:466: Expected string

Here is the code I have mode so far.
local function printGUI()
  monitor.setCursorPos(1,1)
  monitor.write("_____________  ______________ ")
  monitor.setCursorPos(1,2)
  monitor.write(":Add Chicken:  :Add Beef    : ")
  monitor.setCursorPos(1,3)
  monitor.write("-------------  -------------- ")
  monitor.setCursorPos(1,4)
  monitor.write("______________________________ ")
  monitor.setCursorPos(1,5)
  monitor.write("Chicken: "..cNum)
  monitor.setCursorPos(1,6)
  monitor.write("Beef: "..bNum)
  monitor.setCursorPos(1,7)
  monitor.write("Pork: "..pNum)
  monitor.setCursorPos(1,9)
  monitor.write("[DONE]   Press DONE when finished.")
end
local function clearScreen()
  monitor.clear()
  printGUI()
end
local function printTitle()
monitor.clear()
monitor.setCursorPos(1,5)
monitor.write("Press Screen to continue....")
sleep(1)
end
monitor = peripheral.wrap(mside)
mside = "right"
sscreen = "false"   
cNum = 0
bNum = 0
pNum = 0
while true do
printTitle()
local event, p1 = os.pullEvent()
if event == "monitor_touch" then
sscreen = "true"
while sscreen == "true"  do
   clearScreen() 
   local event, side, x, y = os.pullEvent("monitor_touch")
   if x >= 1 and x <= 13 then
	 if y == 1 or y == 2 or y == 3 then
	   cNum = cNum + 1
	 end
   elseif x >= 16 and x <= 29 then
	 if y == 1 or y == 2 or y == 3 then
	   bNum = bNum + 1
	 end
   elseif x >= 31 and x <= 44 then
	 pNum = pNum + 1
	 end
   end
end
end


#2 Grim Reaper

  • Members
  • 503 posts
  • LocationSeattle, WA

Posted 05 February 2013 - 02:51 PM

monitor = peripheral.wrap(mside)
mside = "right"

You have to define 'mside' before passing it to peripheral.wrap. If you don't, then the interpreter will recognize mside as a nil value.

#3 SNWLeader

  • Members
  • 71 posts
  • LocationTampa Bay, Florida

Posted 05 February 2013 - 02:52 PM

I changed it around.....
the mside was not reading right so I replaced mside in monitor = peripheral.wrap(mside) with the monitor side......herp
SOLVED.





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users