diff --git a/src/common/scripting/backend/codegen.cpp b/src/common/scripting/backend/codegen.cpp index eaafaba98..f5e59cd15 100644 --- a/src/common/scripting/backend/codegen.cpp +++ b/src/common/scripting/backend/codegen.cpp @@ -2145,9 +2145,9 @@ FxExpression *FxPreIncrDecr::Resolve(FCompileContext &ctx) ValueType = Base->ValueType; - if (!Base->IsNumeric()) + if (!Base->IsNumeric() || Base->ValueType->Size != 4) { - ScriptPosition.Message(MSG_ERROR, "Numeric type expected"); + ScriptPosition.Message(MSG_ERROR, "Numeric 32 bit type expected"); delete this; return nullptr; } @@ -2232,9 +2232,9 @@ FxExpression *FxPostIncrDecr::Resolve(FCompileContext &ctx) ValueType = Base->ValueType; - if (!Base->IsNumeric()) + if (!Base->IsNumeric() || ValueType->Size != 4) { - ScriptPosition.Message(MSG_ERROR, "Numeric type expected"); + ScriptPosition.Message(MSG_ERROR, "Numeric 32 bit type expected"); delete this; return nullptr; } diff --git a/wadsrc/static/zscript/actors/inventory/stateprovider.zs b/wadsrc/static/zscript/actors/inventory/stateprovider.zs index 05aa06f22..c7f3c4b43 100644 --- a/wadsrc/static/zscript/actors/inventory/stateprovider.zs +++ b/wadsrc/static/zscript/actors/inventory/stateprovider.zs @@ -406,7 +406,7 @@ class StateProvider : Inventory if ((player.cmd.buttons & BT_ATTACK) && !player.ReadyWeapon.bAltFire && !pending && player.health > 0) { - player.refire++; + player.refire = player.refire + 1; player.mo.FireWeapon(ResolveState(flash)); } else if ((player.cmd.buttons & BT_ALTATTACK)