Community Forum

How do I figure out the arguments to a function call?

Forum Overview >> Scripting

CategoryScripting
Created15.05.2019 20:02


Kaj-aage Henneberg (kahfs) 15.05.2019 20:02
Hi. I have much use of the documentation on this site as well a the site Esben Killi has made. So far I have been able to dump tables to figure out how to read and modify game parameter values. But when looking at this function listed by Espen:

FieldUtil = {}

function FieldUtil:getFruitArea() end
function FieldUtil:onCreate() end
function FieldUtil:setAreaFruit() end
function FieldUtil:getMaxWeedState() end
function FieldUtil:getMaxHarvestState() end
function FieldUtil:getWeedFactor() end
function FieldUtil:getCenterOfField() end
function FieldUtil:getPlowFactor() end
function FieldUtil:initTerrain() end
function FieldUtil:getMeasurementPositionOfField() end
function FieldUtil:getLimeFactor() end
function FieldUtil:getMaxGrowthState() end
function FieldUtil:updateFieldPartitions() end
function FieldUtil:getSprayFactor() end

I just wonder how I could find out the arguments and their type for these functions? I'm particularly interested in the functions for getting lime, spray and plow factors, but the question is of a more general nature.
Thankyou for any help. Kaj-Åge

Bilbo Beutlin (BBeutlin) 16.05.2019 01:01
Search in LUADOCs examples for the function calls.
In most cases the name/notation limits the search to certain categories like eg. specs.

Kaj-aage Henneberg (kahfs) 16.05.2019 08:26
Thank you Bilbo.

I've browsed LUADOC and searched as well.

FieldUtil:getFruitArea() is the only function included in LUADOC under FieldUtil.

It seems to me, that the current LUADOC is only a small subset of what Espen Killi published. Is it known whether this is because the writing of LUADOC is not finished, or because we are not supposed to know the rest?
Regards, Kaj-Åge

Viper Gts (ViperGTS96) 27.05.2019 15:47
To get the arguments it does require patience and time. If you are totally stumped, but have a fair handle on lua for FS then I can teach you at https://www.vipergts96.com/forums/.

Best of luck.


Note: Log in to post. Create a new account here.