Follow-up Comment #7, patch #3495 (project freeciv):

>According to this
would be (if it is working) the missing function: Player find.leader
It's not working.

Original (working)
local owner = find.player(0)

Test (not working)
local owner = find.leader(Swedish)
local owner = find.leader('Swedish')
local owner = find.leader("Swedish")
local owner = find.leader(nation_swedish)
local owner = find.leader('nation_swedish')
local owner = find.leader("nation_swedish")

Error: [string "script.code"]:4: attempt to call field 'leader' (a nil value)

>Question: should such functions be collected in something like a lua
(example) library?

I don't know. I write my function in scenario files between [script] code=$
and $.

Now I test the (untested) function, but... Where should I insert? Function
turn_cb(turn, year) or function  city_nation_swedish()?


Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to