Page 1 of 1

Lua: how to call disaster()

Posted: Sat Feb 24, 2018 4:02 am
by taka
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?

Re: Lua: how to call disaster()

Posted: Sat Feb 24, 2018 8:45 am
by taka
Okey I understand.
disaster() function is used for event signal.