Weird Code Error

Place to get help with not working mods / modding interface.
Rax
Burner Inserter
Burner Inserter
Posts: 19
Joined: Fri Mar 01, 2013 3:02 pm
Contact:

Weird Code Error

Post by Rax »

Okay, I'm trying to work on a mod, but constantly getting errors.
Error: "__[modname]__\control.lua:18:'then' expected near '='."

And my code is, on the 18th line, with before & after.

Code: Select all

if game.peacefulmode = true then
  game.showmessagedialog{text={"Peaceful mode enabled, have fun with infinite resources!"}}
Yes, I don't have anything before the if statement.
FishSandwich
Smart Inserter
Smart Inserter
Posts: 1847
Joined: Sun Feb 23, 2014 3:37 pm
Contact:

Re: Weird Code Error

Post by FishSandwich »

Try:

Code: Select all

if game.peacefulmode == true then
game.showmessagedialog{text={"Peaceful mode enabled, have fun with infinite resources!"}}
end
Rax
Burner Inserter
Burner Inserter
Posts: 19
Joined: Fri Mar 01, 2013 3:02 pm
Contact:

Re: Weird Code Error

Post by Rax »

FishSandwich wrote:Try:

Code: Select all

if game.peacefulmode == true then
game.showmessagedialog{text={"Peaceful mode enabled, have fun with infinite resources!"}}
end
BTW, FishSandwich, I love your Colobot videos. They made me start playing again :)
Post Reply

Return to “Modding help”