[Scripting][Lua] Checking custom type of variable.

You can get help here if Freeciv doesn't start on your computer, or if you keep getting fatal errors while playing etc.
Post Reply
Lachu
Elite
Posts: 472
Joined: Sat May 04, 2013 2:19 pm

[Scripting][Lua] Checking custom type of variable.

Post by Lachu »

Is there possibility to check type of lua variable in lua or C code? Type in this case means City, Tech, Player, etc.
Lachu
Elite
Posts: 472
Joined: Sat May 04, 2013 2:19 pm

Re: [Scripting][Lua] Checking custom type of variable.

Post by Lachu »

Ok. I found solution for my problem, but never problem occurs. How to add a new universal(type in requirement list)?
sveinung
Elite
Posts: 548
Joined: Wed Feb 20, 2013 4:50 pm

Re: [Scripting][Lua] Checking custom type of variable.

Post by sveinung »

Lachu wrote:How to add a new universal(type in requirement list)?
It isn't formally documented. Have a look at how it was done before.

Looking at Freeciv's history will reveal the answer to many questions of this type. To be on the safe side have a look at following commits to see if something was forgotten and later added as a bug fix.
Post Reply