Follow-up Comment #7, patch #3495 (project freeciv): >According to http://freeciv.wikia.com/wiki/Lua_reference_manual#find this would be (if it is working) the missing function: Player find.leader (nation_name) 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: <http://gna.org/patch/?3495> _______________________________________________ Message sent via/by Gna! http://gna.org/ _______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev