LuaCommandProcessing

Place to get help with not working mods / modding interface.
Hermios
Long Handed Inserter
Long Handed Inserter
Posts: 80
Joined: Sat Aug 13, 2016 2:57 pm
Contact:

LuaCommandProcessing

Post by Hermios »

Hi
Can someone explain me how it works?
In my control.lua, I set up :
commands.add_command("clearDb","input db to clear",
function(db)
if not db or db=="trains" then
global.trains={}
end
if not db or db=="trainstations" then
global.trainStations={}
end
end
)

Then, I call it in the lua console :
/c commands.clearDb()
But it says that the key "clearDb" doesn't exist... why!!!???

THanks

Hermios
Rseding91
Factorio Staff
Factorio Staff
Posts: 16018
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: LuaCommandProcessing

Post by Rseding91 »

You don't do /c commands.clearDb

You just do

/clearDb
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Modding help”