-
Notifications
You must be signed in to change notification settings - Fork 7
Description
I managed to reproduce the following error multiple times in a period of time:
[!rgm_override] addons/!rgm_override/lua/entities/rgm_axis/init.lua:178: bad argument #2 to 'LocalToWorld' (Angle expected, got nil)
1. LocalToWorld - [C]:-1
2. unknown - addons/!rgm_override/lua/entities/rgm_axis/init.lua:178
This error runs "randomly" when one first selects any entity with the tool. This is because the GizmoAng field does not get initialized by the entity, but from outside in another think hook. The "randomness" to producing the error comes from the different Think hook intervals between the gizmo entity and the tool.
The steps to reproduce this are the following:
- Equip ragdoll mover, select any entity, and change it to scale mode
- Run
ragdollmover_resetgizmo
The following error will run on an interval of 0.001 seconds (according to this)
[!rgm_override] addons/!rgm_override/lua/entities/rgm_axis/init.lua:178: bad argument #2 to 'LocalToWorld' (Angle expected, got nil)
1. LocalToWorld - [C]:-1
2. unknown - addons/!rgm_override/lua/entities/rgm_axis/init.lua:178
To stop this error, click on any entity. This gets suppressed because the axis' GizmoAng field gets populated either from tool's SERVER Think hook or from rgmSendBonePos on the client.
The fix must initialize the axis's GizmoAng
I'm running GMod in the default non-beta branch, currently in March 2025 update. The OS is Windows 10 64 bit. It's likely that this error persists in the newer GMod updates.