• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

What's causing a delay for adding to table?

TCArknight

Well-known member
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
 
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.
 
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
 
Back
Top