Community Forum

onCreate Function

Forum Overview >> Farming Simulator 15

CategoryFarming Simulator 15
Created17.12.2014 11:46


Jim Panousis (Jimi540) 17.12.2014 11:49
Hello Giants,

I want to ask if the onCreate callback changed in FS15 since when i converted my map i'm taking an error that these functions aren't working.

The exactly error says:
Error: Running LUA method 'modOnCreate.myFunctionOnCreate'.

My Regards,
Jimi

D. Ecker (Decker_MMIV) 17.12.2014 21:39
Does your custom LUA-script contain a statement similar to this, and called when the script is first loaded?:

g_onCreateUtil.addOnCreateFunction("myFunctionOnCreate", myCustomMod.myOnCreateFunc);

Have you checked that your LUA-script is correctly loaded, either by your map-mod or from another mod?

Jim Panousis (Jimi540) 17.12.2014 23:53
Yes it has:

g_onCreateUtil.addOnCreateFunction("myFunctionOnCreate", myCustomMod.onCreate);

And the:

function myCustomMod.onCreate(id)
...some code...
end;

And as i said in FS13 all are working just fine.
Don't know what happened now.

Edited:

Fixed. Some code in the script which wasn't compatible with FS15.


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