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


  • Content Count

  • Joined

  • Last visited

About tobivandebulk

  • Rank
    Junior Member
  1. This definitely broke my blockade! I completely misunderstood component.proxy functionality. Even managed to create a table put it into a string now to see a specific position also thanks to the tutorial. Now I'm gonna try to figure out how I can send the string to my client interface since the resolution of the drone interface doesn't allow me to see all coordinates properly. Thank you!
  2. Did a clean reinstall of OpenOS, and now it works properly smh. I guess I messed up my HDD then. Hi, so I opened this second thread for another problem I had, using a github script in order to ease the interaction with my drone and execute code on it remotely, maybe even get something printed into my client interface and get an understanding of what some methods are actually returning for example. I came across https://gist.github.com/fnuecke/6bcbd66910b946b54ec7 So the thing is, when I try to execute this client.lua: local component = require("component") local event = require("event") local modem = component.modem modem.open(2412) modem.broadcast(2412, "drone=component.proxy(component.list('drone')())") while true do local cmd=io.read() if not cmd then return end modem.broadcast(2412, cmd) print(select(6, event.pull(5, "modem_message"))) end it immediately throws me this error: ERROR IN NET EVENTHANDLER[modem.lua]: /lib/network/modem.lua:28: attempt to concatenate a nil value (local 'data') I opened modem.lua, to read that line and maybe understand whats going on but nope. Modem.lua is definitely too high for me to understand at this point in time. But I think I would find solutions to most drone specific things, if I could get this provided script working, even though it takes time. Thanks in advance for any help!
  3. Hi, I hope this is the right place to post this. So basically, since I am really not into lua at all, I firstly tried to just play around with the drone, and I wanted to write a program sooner or later, to harvest things. I tried to figure out how getPosition() works and what it actually returns when I tried to setup a variable with that method, it always threw "string expected, got table". Tried like position = {component.navigation.getPosition()}. <- That somehow had to do with something else, I don't know what exactly. So I tried to get "getPosition()" to work, for to use it to craft some primitive if/else based actions. What I tried lately was: local drone = component.proxy(component.list('drone')()) local position = component.navigation.getPosition() -- since I have the navigation upgrade on my drone if position ~= nil then drone.setStatusText("NotNil") -- since I couldn't get a value like setStatusText(position) to work, it expects string end while true do drone.move(0, 0, 0) -- to keep the drone running end -- throws error oc:bios:2: attempt to index field 'navigation' (a nil value) Also I couldn't get " x = require("X")" to work at all (I also don't know what I actually require when I say "x = require("component")" or "x= require("event") components? librarys? Can I get a list of these librarys that exist?) The require attempts threw "attempt to call global 'require' (a nil value)". Things like "table.toString(tableName)" didn't work for me too. Guess toString is just not included maybe. I am really not much into scripting yet, not to mention lua. The only thing I ever learned quite a bit was javascript es5 and a bit React.js with es6. Quite frustrating for me to not even get a simple variable that calls a method of some component working in lua lmao. Thanks in advance for any help!
  • Create New...

Important Information

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