Lua: <expression> expected near 'local'

112 Views Asked by At

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.

0

There are 0 best solutions below