Thread: Red Sands
View Single Post
  #179  
Old 01-26-2012, 11:13 AM
grimeleven grimeleven is offline
Approved Member
 
Join Date: Feb 2010
Posts: 72
Default

Nvm post edited, i had found a solution to a bug (patch 1.6) that caused game crash to hang forever when unit leveled to 15 but it cannot be used... side effect is that now units stop getting experience, so i will continue to search for a better way to fix this.

Posting the code so if anyone can help with lua, thanks
Code:
        if expa_bonus > 0 then
            --if expa_income_times < expa_income_limit then
                Attack.val_store(attacker,"expa_bonus",expa_bonus)
                --Attack.val_store(attacker,"expa_income",expa_income_times+1) -- êàæäîå ñóùåñòâî ïîëó÷àåò îïûò â ðàóíäå òîëüêî expa_income_limit ðàç, íî â òîì ñëó÷àå, åñëè ïàðàìåòð expa_bonus îòëè÷åí îò 0
            --end
        end
Line 218 "--if expa_income_times < expa_income_limit then" seems the culprit, if we remove the comment the games gives error Line.218 "attempt to compare two nil" then we can click "OK", better than a crash i guess.

Edit.. game crashed to desktop on the second turn when removing the comment... -_-

Last edited by grimeleven; 01-26-2012 at 11:34 AM.
Reply With Quote