Community Forum

I feel like scripting for Farming Simulator is completely different than regular LUA

Forum Overview >> Scripting

Created27.10.2016 07:38

Tristan Dow (Unknown) 27.10.2016 07:44
I have been struggling over, what appears to be such a simple script.
All I am trying to do is delete the shop trigger, no matter what map it's on, and basically keep it gone as long as the mod is installed, but I can't even get it to delete.

function ShopTrigger:delete()
if g_currentMission:getIsClient() then

but no matter what I do, I can't seem to get it working.
Yes, I am relatively new to scripting with LUA, but not to other languages and I learned them all the same way. Pick a relatively difficult project and go from there.
I understand most of the things in LUA, and I can run code from it directly, but for some reason, as soon as I start this script, I draw a blank.
Any help would be much appreciated.

Emil Drefers (Unknown) 27.10.2016 09:57

well, if your custom function is not called at all the problem might be somewhere ...

You could upload your script, eventually the complete mod so we can check and see what goes wrong.

Have fun and cheers,

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