When you try to create this vehicle you start getting a lot errors in client RPT and the game get stuck for a while.
Description
Description
Details
Details
- Severity
- Block
- Resolution
- Open
- Reproducibility
- Always
- Operating System
- Windows 10 x64
- Operating System Version
- Latest to until the date
- Category
- General
Steps To Reproduce
Run the next code in the debug console:
[] spawn { "test_EmptyObjectForBubbles" createVehicle [0,0,0]; };
Additional Information
Error thrown:
Suspending not allowed in this context Error in expression <1s; _object setVariable ["effects",[]]; sleep (4 + random 20); };> Error position: <sleep (4 + random 20); };> Error Generic error in expression
Event Timeline
Comment Actions
Hi, the issue is in the test object itself. Code that throws the error comes from init event handler which doesn't allow code suspension and the code is called, so it doesn't changes and still doesn't allow code suspension.
init = "(_this select 0) call compile preprocessFile ""\A3\weapons_f\data\scripts\bubbles.sqf"";";
The test code doesn't need to be in spawn, it doesn't effect anything. You need to change either the init code itself to:
init = "(_this select 0) spawn compile preprocessFile ""\A3\weapons_f\data\scripts\bubbles.sqf"";";
... or wrap the code inside bubbles.sqf into spawn.
And one last thing, it is not advisable to create anything on [0,0,0] coords.
Comment Actions
"spawn compile preprocessFile"
is the same as execVM.
Should be fixed on latest dev-branch update https://forums.bohemia.net/forums/topic/140837-development-branch-changelog/?page=54&tab=comments#comment-3316350