Two questions...errorlog location and a dynamic named GP

  1. Enabled error logging, but I can’t find the error log file - any hints?

  2. I have a GP(s) to handle some accounting around terrain tiles. I am using an expression for the variable name to capture the location as part of a GP name. The resulting name is in the form of CurrentTerrainOccupantXXXX where XXXX is the hex location where the piece is placed. My goal is to have global property variables that are unique to tile pieces based on their location. I’d rather not make it static, but I can as a backup plan.

I have looked at similar examples and I feel like I am on the right track, but I am stuck now.

Ex: a terrain piece is placed in hex 1522.

The GP resulting variable name in the piece should be CurrentTerrainOccupant1522. When I SetGlobalProperty, I use “CurrentTerrainOccupant”+$location and that seems to work fine.

If I use reportAction as a debug method to show what I am doing, I can print out the variable name and it looks correct. If I try to use that same expression (or variations of it) to try and get the value, I get BadModule data.

If I use ReportAction to print the value of the GP as below, I get BadModule complaints for the GetProperty portion. I’ve tried various usages with brackets and $ signs to no avail.

{“name:” + “CurrentTerrainOccupant”+location + “value:” + GetProperty(“CurrentTerrainOccupant”+location)}

Any hints?

Also tried creating the GP beforehand (in the GP area of the module) just to ensure it was actually a variable → CurrentTerrainOccupant1522 in this case, with an initial value of “None”.

I still get the bad module data when I use an expression as the variable name when trying to extract the value…

Error log locations by OS: Error Logs - Vassal