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

Salmax

Members
  • Content Count

    2
  • Joined

  • Last visited

Posts posted by Salmax

  1. 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)

     

     

     

×
×
  • Create New...

Important Information

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