Error: Running LUA method 'mouseEvent'

juanarighini
Posts: 4
Joined: Sat Jan 06, 2024 4:37 pm

Error: Running LUA method 'mouseEvent'

Post by juanarighini »

Hi guys. I have the next problem. When I try to enter the "Animal Enclosures" section I cannot enter the menu, but it does not react. In the log.txt file I find the following code
"Error: Running LUA method 'mouseEvent'
dataS/scripts/animals/AnimalFoodManager.lua(256) : attempt to index a nil value" .
TorhanPiper
Posts: 6
Joined: Fri Sep 08, 2023 10:27 am

Re: Error: Running LUA method 'mouseEvent'

Post by TorhanPiper »

The error message "Error: Running LUA method 'mouseEvent' dataS/scripts/animals/AnimalFoodManager.lua(256) : attempt to index a nil value" indicates that there is a problem with the code in the AnimalFoodManager.lua file. Specifically, there is an attempt to access a value that is nil. This can happen for a few reasons, such as if the value is not initialized or if it is being referenced before it is set.

To fix this error, you will need to find the line of code that is trying to index a nil value and fix it. This may involve initializing the value or checking to make sure that it is not nil before trying to access it.

Here are some steps you can take to try to fix the error:

Open the AnimalFoodManager.lua file in a text editor.
Search for the line of code that is causing the error.
Fix the code so that it does not try to index a nil value.
Save the AnimalFoodManager.lua file.
Try to enter the "Animal Enclosures" section again.
If you are not comfortable editing code yourself, you can try to find a fix online or contact the game's developer for help.

I hope this helps!
Noraf
Posts: 2227
Joined: Thu Oct 17, 2013 2:53 pm

Re: Error: Running LUA method 'mouseEvent'

Post by Noraf »

Easier solution would be to fix a mod conflict, as this sounds suspiciously like one.

It would also be beneficial if you post your whole logfile here.
:hi:

FS22 Bug-tracker
How to post your log
Giants Discord
Posting pictures How-to

Just remember, if the world didn't su.., we'd all fall of...
Post Reply