0

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("modem")
local osLib = require("os")
local ioLib = require("io")
local writer = require("component").os_cardwriter

However, when I try to run it, it says the following error:

Lua: [5:0] <expression> expected near local

I've tried removing the local parts but that hasn't changed anything.
Other than that, I haven't found anything on the Internet so far on how to fix this issue.

IDE: OCLIDE, ran in OpenComputers

Edit: Turns out removing the imports for math, io, and os fixed it.

daysant
  • 1
  • 2
  • I'm not getting any syntax error from that code, however, I'm not familiar with OpenComputers, so it could have a modified Lua interpreter. – luther Oct 22 '22 at 22:49
  • As far as I know, OpenComputers runs a vanilla version of Lua 5.3, however it has some custom libraries. – daysant Oct 23 '22 at 09:51

0 Answers0