Lua: how to call disaster()

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
taka
Posts: 12
Joined: Sat Oct 11, 2014 11:42 pm

Lua: how to call disaster()

Postby taka » Sat Feb 24, 2018 4:02 am

Hi. I'm using freeciv 2.5.7.

Lua reference manual says:
disaster(Disaster disaster, City city)


What is the Disaster?
I wrote the code to cause a disaster (fire) in event_city:

Code: Select all

local disaster_event = "disaster_fire"
disaster(disaster_event, event_city)

but I got a error.

Code: Select all

lua error: attempt to call global 'disaster' (a nil value)


what's wrong?

taka
Posts: 12
Joined: Sat Oct 11, 2014 11:42 pm

Re: Lua: how to call disaster()

Postby taka » Sat Feb 24, 2018 8:45 am

Okey I understand.
disaster() function is used for event signal.