FAForever / fa

Lua code for FAF
229 stars 235 forks source link

Warning in Strat scripts #2839

Closed speed2CZ closed 5 years ago

speed2CZ commented 5 years ago
warning: Error running OnDamage script in Entity uea0304 at 2ae1cd08: ...\gamedata\units.nx2\units\uea0304\uea0304_script.lua(20): attempt to call method `GetBlueprint' (a nil value)
         stack traceback:
            ...\gamedata\units.nx2\units\uea0304\uea0304_script.lua(20): in function <...\gamedata\units.nx2\units\uea0304\uea0304_script.lua:19>
            [C]: in function `DamageArea'
            ...cifartilleryproton01\cifartilleryproton01_script.lua(22): in function <...cifartilleryproton01\cifartilleryproton01_script.lua:21>

happening since this: https://github.com/FAForever/fa/commit/5b49ee8d85128177946a9288a26e167d7a9459bb

Also why was a new category created extra for strat bombers? categories.BOMBER * categories.TECH3 would do just fine

Strogoo commented 5 years ago

well, .CategoriesHash is just faster than any built-in function that checks categories.

if instigator and we'll be fine :)

shalkya commented 5 years ago

how do you reproduce ? can't achieve to do that warning

speed2CZ commented 5 years ago

It's been such a long time that I actually forgot

Strogoo commented 5 years ago

It appears when strat takes damage from t3 arty or any other projectile that has DamageArea call in its script