Lua: how to call disaster()

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

Lua: how to call disaster()

Post 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?
taka
Posts: 12
Joined: Sat Oct 11, 2014 11:42 pm

Re: Lua: how to call disaster()

Post by taka »

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