18 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
0
answers
97
views
Lua preemptive multitasking and supporting nested coroutines
I am trying to write a scheduler for a virtual computer that runs Lua and is transparent to the user (i.e.; no coroutine. yields needed) and would still like the user to be able to create coroutines ...
0
votes
1
answer
539
views
Is there a way to set a timeout for waiting for an event in Lua? (Opencomputer's lua)
I was creating a script which would send something and wait for it to be received back, but it just hang.
Here's my script:
local component = require("component")
local event = require("...
0
votes
0
answers
56
views
server only pulls using linked card
I have a server that forwards messages from a Linked card to another server with a Network card. This works fine, server 1 (with the linked card) pulls a message from pc, and sends it to server 2(...
0
votes
0
answers
272
views
Program with linked card in OpenComputers (minecraft)
I am trying to make a system where a server and a computer talk to each other from a great distance. This is not possible with wires as they need to pass trough unloaded chunks. A linked card has ...
0
votes
1
answer
101
views
Lua program throwing error with stdin after completion
I've written a lua program for OpenComputers in Minecraft which downloads a github repo to the computer, file structure and all. The code:
internet = require("internet")
io = require("...
0
votes
0
answers
158
views
Lua: <expression> expected near 'local'
I've put the following code in a file for OpenComputers:
local mathLib = require("math")
local event = require("event")
local data = require("data")
local modem = require(...
0
votes
1
answer
1k
views
how to execute a string as a line of code in lua
I made myself a drone os in the minecraft mod Opencomputers, but I want to be able to make it run any line of code once recieved from the network card. I've tried everything I found here but none of ...
0
votes
0
answers
577
views
LUA OpenComputers Computronics Minecraft Speech Box Queue
I had a problem with coding in OpenOS system of the OpenComputers mod for Speech Box of the Computronics mod. I can’t say phrases in a certain order. It seems to me that all the phrases that I launch ...
2
votes
1
answer
696
views
Is there to way to run code from a variable in Lua
So, I've got this very interesting position where I have an entire set of code loaded into a variable, and I desperately want to run this code as it defines critical variables and functions for later ...
0
votes
1
answer
627
views
LuaRock Visual Studio Command Prompt Error
I try to run luarocks install luafilesystem command in Visual Studio Command Prompt. But it says "Error: Failed finding Lua library. You may need to configure LUA_LIBDIR".
Why am i getting that ...
user avatar
user10911520
1
vote
1
answer
2k
views
My code gives an "attempt to call a nil value" on the computer controlled seed analyzer in Minecraft
So I have spent a few hours looking for documentation on the item "Computer Controlled Seed Analyzer" with no current information that is useful. My goal is to set up a seed analyzer that will check ...
3
votes
2
answers
32k
views
How to fix "attempt to index a nil value"
I am having an error with my code : it keeps telling me "attempt to index a nil value (global 'sides')"
I'm trying to learn Lua through Minecraft (OpenComputers) and found myself stuck with a nil ...
0
votes
4
answers
2k
views
Lua access indeces from table generated from JSON
So, I am bound to use Lua for getting weather data from the Openweathermap API.
I managed to send a http request to return and store all data but now I am stuck with a Lua table I don't know how work ...
4
votes
2
answers
3k
views
Simple trilateration algorithm in simulated 3D space
Context: I am working on implementing a navigation system for the mobile computers added by OpenComputers, a Minecraft mod. For those not familiar with the mod, it basically adds a variety of Lua-...
2
votes
0
answers
106
views
Code executed using load()() cannot access functions from its caller
So I am writing and testing my new OS kernel and just finished the part where it loads up /bin/init.lua, I tested it, it loads up init.lua, andddd it exit mid-execution. I have a function in init.lua ...
user avatar
user9102859