Jump to content




Problem with scrooling tect code



4 replies to this topic

#1 S0N_G0KU_Z

  • Members
  • 16 posts

Posted 10 April 2013 - 12:41 PM

I tried to run my scrolling text program but i get and error, (string "startup" ) :12: 'then' expected

This is ts the code

  • local pos = 18


  • ecran = peripheral.wrap("right")


  • ecran.clear()


  • ecran.setBackgroundColor(2)


  • ecran.setTextColor(2048)


  • ecran.setTextScale(5)


  • while true do


  • if pos==-30


  • pos = 18


  • end


  • mon.clear()


  • mon.setCursorPos(pos,1)


  • mon.write("GG Inc. We Make The Best")


  • pos = pos-1


  • os.sleep(.15)


  • end


#2 Engineer

  • Members
  • 1,378 posts
  • LocationThe Netherlands

Posted 10 April 2013 - 12:50 PM

Add then on line 12

#3 SadKingBilly

  • Members
  • 160 posts

Posted 10 April 2013 - 01:43 PM

Well, you started off calling the monitor "ecran", then you swapped to calling it "mon", but you didn't rewrap it with a different name. Also, what Engineer said.

#4 Smiley43210

  • Members
  • 204 posts

Posted 10 April 2013 - 04:44 PM

And please, next time, use the code tag. It makes things much nicer and compact.

#5 S0N_G0KU_Z

  • Members
  • 16 posts

Posted 11 April 2013 - 08:36 AM

ok thanks all of you :)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users