Closed ohlidalp closed 8 months ago
Tested: Truckshops ✅ Races ✅ Demo script ✅ Road editor ✅ Script editor ✅
Only new warning I've seen is on the "GPU benchmark" terrain (Benchmark.zip) where every tree spawned shows:
[RoR|Script|Notice] Warning: a callback function with signature 'void e(int, string, string, int)' was not found
The script still works as normal.
One point for @Xploder98 in a friendly Devs vs. Users match :)
Long story short, Xploder mixed up callbacks and the game obligued which resulted in script failure with error asCONTEXT_NOT_PREPARED. This hapenned because our callback system is very confusing:
game.spawnObject()
, where you pass a function name and it gets invoked on eventbox collision.SE_EVENTBOX_ENTER
andSE_EVENTBOX_EXIT
which work with the classic event callback mechanismeventCallback()
(and the extendedeventCallbackEx()
version) - it does the same job and even provides some extra data. This works independently of the "script handler" mecahnic described above - you just dogame.registerForEvent(SE_EVENTBOX_ENTER)
and you're covered, for all objects.Changes made:
Example AngelScript.log if you mix up the callbacks:
What needs to be tested: