Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
  • 0
Salmax

robot.turn...() not working on server

Question

Hello :)

 

I use on my server and client:

"OpenComputers-MC1.8-1.5.3.8-universal.jar"

"forge-1.8-11.14.1.1334-universal.jar" or "forge-1.8-11.14.1.1339-universal.jar"

 

In my program does not perform the function of "robot.turn ... ()". 

It does not work only on the server, if you test a program on a local world is OK.

 

My program:

 

local r = require("robot")
local slot = 1
local xmax = 11
local ymax = 11
local x = 1
local y = 1
local turn = 0
r.select(slot)
while true do
if r.count(slot) == 0 then
slot = slot + 1
if slot == r.inventorySize() + 1 then
print("Koniec materiału!")
os.exit()
end
r.select(slot)
else
if r.placeDown() == nil then
print("Nie mogłem postawić bloku!")
os.exit()
end
x = x + 1
if x == xmax + 1 then
x = 1
y = y + 1
if y ==  ymax + 1 then
print("Koniec pracy :)")
os.exit()
end
if turn == 0 then
r.turnRight()
r.forward()
r.turnRight()
else
r.turnLeft()
r.forward()
r.turnLeft()
end
turn = turn + 1
if turn == 2 then turn = 0 end
else
if r.forward() == nil then
print("Nieusunięta przeszkoda!")
os.exit()
end
end
end
end

 

Please help.

 

(sorry for my english)

 

 

 

Link to post
Share on other sites

2 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.