Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

have you heard anything back on this yet?

Also, any idea if 6 channels and 63 crops is the maximum that you can have?  

hey so I’m still working on my modded map here and I’ve run into this error and I can’t figure it out.   Have you ever encountered this one

Ok so my error reads densitymapfilter: called from fs22_precisionfarminganhydrousready/scripts/maps/NitrogenMap.lua (1161) 

And then it comes up again with (1202) in parenthesis.  

My map works fine when I use the precision farming mod from modhub but when I use this one it throws this error.  

Do you know how to fix it or at least determine what is causing it.  Do the numbers in parenthesis mean something?   Do I go into the mod and that lua file and look for line 1161

I'd have to look at that one to be sure but it's probably DensityMapFilter.new not just DensityMapFilter. If it is it means it's trying to reference a map layer that does not exist.

well according to my log….it just reads DensityMapFilter.    I’m just confused cause like I said it works fine with the ingame modhub precision farming mod but when I use Collins custom precision farming mod it throws this error.   I take it it has something to do with the nitrogen map in that mod but I don’t understand the invalid object parameter part and how to determine what is wrong.  

if your thinking it’s a map layer that doesn’t exist…where would I start to look at that?   In the map i3d.  Terrainlayerdetail?

(1 edit)

Ok, so your issue is likely related to the anhydrous version not being a 1:1 copy of the vanilla Precision Farming scripts. The vanilla version has a terrainDataPlaneId check (i.e. map layer) and the anhydrous version does not. This is causing the following function to fail.

fruitFilter:resetDensityMapAndChannels(desc.terrainDataPlaneId, etc, etc)

PF Vanilla


PF Anhydrous

so to make it work do I need to add that wording in somewhere?  

The weird thing is I’ve been using it for many months with the anhydrous and I’ve added lots of fruits and it always worked….then recently I did some deleting and adding of different fruits and trees and only then did it start to cause the error.    I’ve reverted back to my previous maps to find where the issue started and it seems like it started when I made flax as flax2 and flax windrow and flax converted into chaff

Basically I wanted to make flax as chaf, cut and bake flax, harvest flax, and cut and pickup harvest flax.     Seems like that’s where the issue started.   

If you go to the anhydrous mod NitrogenMap.lua to the line shown in the screen shot and make it look like the vanilla version, it should at least stop making the error. Why the error is happening is because one of your crops isn't loading correctly or not getting a terrainDataPlaneId. Without the check for that in the code, it is throwing the error you see. That check is there to prevent the density map filter from trying to do something with a missing value.

Likely somewhere else in the log will be fruit related warnings or errors.

alright so I put that into the lua and now it cleared that error in my log, but created 2 different ones for

NitrogenMap.lua:1160: ‘then’ expected near ‘desc’

And

Precision farming.lua:60: attempt to index global ‘NitrogenMap’ (a nil value)

That is a syntax error meaning the "then' statement is missing from the line. Double check your edit. Because NitrogenMap.lua has a syntax error it does not compile, which is why you get the second error.