Skip to content

Need some help with the basics #1258

Answered by fatboychummy
ATH4 asked this question in Q&A
Dec 18, 2022 · 1 comments · 6 replies
Discussion options

You must be logged in to vote
while true do
  if redstone.getInput("Left") = 1 then
    motor = peripheral.wrap("left")
    motor.setSpeed(256)
  else
    motor.stop
  end

motor.stop is missing (), so lua thinks you are trying to assign something to motor.stop but forgot to actually do = something

motor.stop() is what you want.

Also, you need one more end.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@ATH4
Comment options

@fatboychummy
Comment options

@ATH4
Comment options

@fatboychummy
Comment options

@ATH4
Comment options

Answer selected by SquidDev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants