[CivUP 2.2.7/GEM 1.11.5] Error in lua.log when using modmod

skodkim

Deity
Joined
Jan 16, 2004
Messages
2,497
Location
Denmark
Hi

I have a modmod that used to work a few versions ago, but when I boot it up with CivUP 2.2.7/GEM 1.11.5 I get the following Error in lua.log

[1936.284] Runtime Error: [string "C:\Users\hollenbo\Documents\My Games\Sid Me..."]:138: attempt to index local 'pPrereqTech' (a nil value)

I dont think I've done anything "serious" but adapt to the new Building_addon table.

It seems to add a new instance of the same error to the log file every second.

\Skodkim

Edit: Should say that the modmod runs AFTER GEM/CivUP
 
Does your modmod add a build (improvement) to any of the following technologies:

Acoustics
Ballistics
Radar
Penicillin
Mobile Tactics

I included code to move units and buildings off these deleted techs, and working on including more checks now.

Edit: Try replacing your Gem/Research/GER_End.sql with the attached version, and see if it makes a difference.
 

Attachments

I dont add anything to the above mentioned techs and unfortunately the updated sql file did not help.

Just a hunch: Could it be bacause of adding second prereq techs for a couple of wonders?

\Skodkim
 
Apparently it isn't the addition of second prereq techs for some of the existing wonders. At least it doesn't happen if I ass a new sonder with a second prereq tech.

In my modmod, I use "PrereqTech" for
  • New building addons that are available though the building_addon system
  • New building addons that are available though the "IsMarketplace" tag in the Buildings table
  • A new building (replaces standard library for Rome)
  • Three new tile improvements
  • Techs for building these improvements AND trading posts on oasis

\Skodkim
 
Hi

through trial and error I've found that this did not occur if I deleted all lines containing <PrereqTech>TECH_###</PrereqTech> in my modmod

Could this be a matter og GEM trying to set AI Priorities for things that are added in a modmod that runs after GEM? As I reported in this thread it looks as though GEM does this.

\Skodkim
 
A lot of trial and errors later...

I have five xml files containing <PrereqTech>TECH_####</PrereqTech>, but the problem sees to be related to the one included in this post.

It contains three new tile improvements that have PrereqTech set.

Please, please, please see if this can be fixed... :rolleyes:

\Skodkim
 
The error message from post #1 is in the file which creates terrain tooltips, specifically the function which checks if the player has the necessary technology to build an improvement. I'm adding code for the next version which should give us more information to debug the problem. See what happens if you replace this file with the attached version:

Civup\3_Interface_Branches\1_Mods\CsebExtendedPlotMouseover\CEPM_CommonPlotHelpers.lua
 

Attachments

Hi Thal

I now get the following:

[947.862] PlotHelpManager: ERROR HasTechForBuild: BUILD_FP_TRADING_POST prereq TECH_TRADE does not exist in Technologies!

Looking through your files it seems you removed TECH_TRADE and replaced TECH_TRAPPING with the "Trade" name? If so I probably just need to set prereqtech to trapping to make it work.

More Info: Yes - replacing TECH_TRADE with TECH_TRAPPING removes the lua.log errors. Could I perhaps get you to reply to the question I asked here?: Link

\Skodkim
 
Back
Top Bottom