Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321
|
I'm running into an issue I'm not sure how best to troubleshoot.
I have this particular "advantage" which costs 3 points. However, if the hero taking it is from a certain nation, the cost is reduced to 1. Right now, and this seems to only happen with an advantage that has a discount for the hero's nation, the first time one is selected on the table_dynamic it takes forever to complete the addition to the table, going to the 'hourglass' cursor for a good minute (so showing the process isn't completely locked up) before completing. Every other advantage seems to do the same until a second 'national' advantage is selected, and then it all returns to normal. I have a feeling it's something in my cost calculations, but not sure where. Is there a debug setting or something that will show me a trace of what's going on? Thanks! TC |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
My guess is that somewhere, there's a for...next or a foreach...nexteach that's being triggered to run infinitely from this item, and somehow not from the others (as far as I can tell, HL does some testing for infinite loops, and can escape them after a while).
I'd add debug lines to the for...next and foreach...nexteach commands for anything related to this - without more details, I can't suggest which of them might be the problem. |
#2 |
Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321
|
Thank you Mathias!
I found the issue in a lastpos(str1,searchstr) check. In my case, it looks like the searchstr was empty and I guess that makes it check the entire hero for "" ? The position when I did a notify turned out to be something like a 10+ digit number... Could this be an error in the function? Thanks! TC |
#3 |
|
|