Error in parsing script 'hitUnit' for 'Global Event Script': invalid operation in line: 'if and eq shield_skipper 1 shieldType 0;'
if and eq x y #first `eq` eq z w; #second `eq`
Error in parsing script 'hitUnit' for 'Global Event Script': invalid operation in line: 'set attacker is_concealed 0;'
Error in parsing script 'hitUnit' for 'Global Event Script': invalid operation in line: 'BattleUnit.setTag is_concealed 1;'
unit.setTag Tag.SOME_NAME value.
newTurnUnit: #ALL GOGGLES - offset: 1.6 code: | var int las_goggles_worn; #var ptre BattleUnit itemOwner; #item.getOwner itemOwner; # Clear all unit resist types and minimums so resistance items can set again #itemOwner.setTag Tag.UNIT_RESIST_ITEM_SLOT_300 0; #unit set las_goggles_worn 0; return; newTurnItem: #ITS GOGGLES THAT CRASH THE GAME!!!!!!!!!!!!!! - new: GOGGLES_STRENGTH offset: 9.1 code: | var ptre BattleUnit itemOwner; var ptr RuleItem itemRuleset; var int anti_laser_goggles; var int las_goggles_worn; var int goggles_are_broken; #something is wrong var int temp; item.getOwner itemOwner; # If no owner, skip script if eq itemOwner null; debug_log "ItemOwnerIsNullValue"; return; end; item.getRuleItem itemRuleset; itemRuleset.getTag anti_laser_goggles Tag.ANTI_LASER_GOGGLES; if eq anti_laser_goggles 1; set las_goggles_worn 1; itemOwner.getTag temp Tag.UNIT_RESIST_ITEM_SLOT_300; debug_log "Anti_laser_goggles_working"; else; itemOwner.setTag Tag.UNIT_RESIST_ITEM_SLOT_1 1; #if eq temp 1; #debug_log "TEMP = 1"; #itemOwner.setTag Tag.UNIT_RESIST_ITEM_SLOT_300 1; #end; end; debug_log "laser_goggles_var: " anti_laser_goggles; debug_log "anti laser goggles worn: " las_goggles_worn; if eq temp 1; set las_goggles_worn 1; end; if eq goggles_are_broken 1; debug_log "Goggles_blown_to_heaven't"; set las_goggles_worn 0; end; return;
[2024-03-09_15-52-32] [FATAL] A fatal error has occurred: code 0xc0000094[2024-03-09_15-52-32] [FATAL] ??[2024-03-09_15-52-32] [FATAL] ??[2024-03-09_15-52-32] [FATAL] ??[2024-03-09_15-52-32] [FATAL] ??[2024-03-09_15-52-32] [FATAL] ??[2024-03-09_15-52-32] [FATAL] ??[2024-03-09_15-52-32] [FATAL] ??[2024-03-09_15-52-32] [FATAL] 0x7ffd8a5b2560 BaseThreadInitThunk[2024-03-09_15-52-32] [FATAL] 0x7ffd8c54aa30 RtlUserThreadStart[2024-03-09_15-52-32] [FATAL] Crash dump generated at C:/Users/IDKin/OneDrive/Documents/OpenXcom/2024-03-09_15-52-32.dmp[2024-03-09_15-52-54] [FATAL] OpenXcom has crashed: code 0xc0000094Log file: C:/Users/IDKin/OneDrive/Documents/OpenXcom/openxcom.logIf this error was unexpected, please report it on the OpenXcom forum (OXCE board).The following can help us solve the problem:1. a saved game from just before the crash (helps 98%)2. a detailed description how to reproduce the crash (helps 80%)3. a log file (helps 10%)4. a screenshot of this error message (helps 5%)
The thread tried to divide an integer value by an integer divisor of zero.
I do not see how script itself could cause this crash, you not even have `div` in it.
"Could you show exact thing that cause this error? Game should not crash and this need be fixed anyway." ~ Yankes
stats: tu: 0 stamina: 0
stats: tu: 4 stamina: 1
hitUnit: - new: GOGGLES_STRENGTH_lowerer_and_breaker offset: 9 code: | var ptr RuleItem itemRuleset; var ptr RuleArmor armor_rule; #var ptr BattleItem ItemBattle; var ptre BattleUnit itemOwner; var ptre BattleUnit Unit; var int goggles_curr_strength; var int goggles_are_broken; var int las_goggles_worn; var int temp; var int dumb; item.getOwner itemOwner; itemOwner.getTag temp Tag.UNIT_RESIST_ITEM_SLOT_300; itemOwner.getTag dumb Tag.GOGGLES_BROKEN_FR; if eq temp 1; #las_goggles_worn 1; sub goggles_curr_strength 1; debug_log "goggles current strength is: " goggles_curr_strength; end; if eq goggles_curr_strength 0; set goggles_are_broken 1; itemOwner.setTag Tag.GOGGLES_BROKEN_FR 1; end; return power part side; newTurnItem: #ITS not GOGGLES THAT CRASH THE GAME!!!!!!!!!!!!!! - new: GOGGLES_STRENGTH offset: 9.1 code: | var ptre BattleUnit itemOwner; var ptr RuleItem itemRuleset; var int anti_laser_goggles; var int las_goggles_worn; var int goggles_are_broken; #something is wrong var int temp; item.getOwner itemOwner; # If no owner, skip script if eq itemOwner null; debug_log "ItemOwnerIsNullValue"; return; end; item.getRuleItem itemRuleset; itemRuleset.getTag anti_laser_goggles Tag.ANTI_LASER_GOGGLES; unit.getTag goggles_are_broken Tag.GOGGLES_BROKEN_FR; if eq anti_laser_goggles 1; set las_goggles_worn 1; itemOwner.getTag temp Tag.UNIT_RESIST_ITEM_SLOT_300; debug_log "Anti_laser_goggles_working"; else; itemOwner.setTag Tag.UNIT_RESIST_ITEM_SLOT_300 1; #if eq temp 1; #debug_log "TEMP = 1"; #itemOwner.setTag Tag.UNIT_RESIST_ITEM_SLOT_300 1; #end; end; #debug_log "laser_goggles_var: " anti_laser_goggles; #debug_log "anti laser goggles worn: " las_goggles_worn; if eq temp 1; set las_goggles_worn 1; end; if eq goggles_are_broken 1; debug_log "Goggles_blown_to_heaven't"; set las_goggles_worn 0; itemOwner.setTag Tag.UNIT_RESIST_ITEM_SLOT_300_BROKEN 1; end; return;
[2024-03-12_15-25-06] [ERROR] Unknown variable name 'item'[2024-03-12_15-25-06] [ERROR] Error in parsing script 'hitUnit' for 'Global Event Script': invalid operation 'item.getOwner'[2024-03-12_15-25-06] [ERROR] Error in parsing script 'hitUnit' for 'Global Event Script': invalid operation in line: 'item.getOwner itemOwner;'[2024-03-12_15-25-06] [ERROR] Unknown variable name 'unit'[2024-03-12_15-25-06] [ERROR] Error in parsing script 'newTurnItem' for 'Global Event Script': invalid operation 'unit.getTag'[2024-03-12_15-25-06] [ERROR] Error in parsing script 'newTurnItem' for 'Global Event Script': invalid operation in line: 'unit.getTag goggles_are_broken Tag.GOGGLES_BROKEN_FR;'