Page MenuHomeFeedback Tracker

Workbench remote Console not executing code
Reviewed, NormalPublic

Description

I have followed this tutorial:
https://community.bistudio.com/wiki/Arma_Reforger:Scripting_Example

However, I get no code errors when I run the game but I cannot get the "Remote Console" to run my script. I thought this might be a coding error but simply trying to execute a Print("Hello World"); also did not execute the code.

I have a world open and the debugger says it is connected. The debugger can also start and stop the game in the world editor window, its just the code that cannot execute. I put the game into run before trying to press the run button.

I have followed some guidance on Discord to restart the workbench a few times to get around it. However after 10 attempts I still could not get it to work. I've tried over a couple of days and again, I cannot get it to work.

I have tried multiple different projects just to make sure it wasn't the one that had got corrupted.

I am quite happy to send the log files over if this required.

Please see the attached image for my setup.

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
General
Steps To Reproduce
  1. Open a world
  2. Open script editor
  3. Run the world via the debug option - or just start it from world editor
  4. Wait until it says debug connected
  5. Try to run a set of code from the "Remote Console"
  6. Get no run of the code from it, nor any output from the script in the window
Additional Information

Here is a copy of the script.log:

18:01:23.576 SCRIPT : Initializing scripts
18:01:23.576 SCRIPT : ScriptProjectManager init
18:01:23.638 SCRIPT : Compiling GameLib scripts
18:01:23.656 SCRIPT : Loaded 232x files; 469x classes; used 518/2097 kB (24%) of static memory; CRC32: f5550672
18:01:23.659 SCRIPT : Compiling Game scripts
18:01:24.095 SCRIPT (W): @"scripts/Game/Character/Cameras/ADS/CharacterCameraADS.c,383": 'GetBoneMatrix' is obsolete: Use GetAnimation().GetBoneMatrix() instead
18:01:24.212 SCRIPT (W): @"scripts/Game/GameMode/SCR_BaseGameMode.c,643": 'RequestServerReload' is obsolete: Use RequestScenarioRestart instead!
18:01:24.212 SCRIPT (W): @"scripts/Game/GameMode/SCR_BaseGameMode.c,1019": 'HandleOnCharacterCreated' is obsolete: Use OnControllableSpawned instead
18:01:24.212 SCRIPT (W): @"scripts/Game/GameMode/SCR_BaseGameMode.c,1040": 'HandleOnCharacterDeath' is obsolete: Use OnControllableDestroyed instead
18:01:24.217 SCRIPT (W): @"scripts/Game/GameMode/SaveLoad/SCR_SaveManagerCore.c,90": 'RequestServerReload' is obsolete: Use RequestScenarioRestart instead!
18:01:24.257 SCRIPT (W): @"scripts/Game/Music/SCR_SpawnMusic.c,22": 'SGetOnSpawn' is obsolete: Use SCR_RespawnComponent.GetOnRespawnResponseInvoker_O() instead
18:01:24.257 SCRIPT (W): @"scripts/Game/Music/SCR_SpawnMusic.c,27": 'SGetOnSpawn' is obsolete: Use SCR_RespawnComponent.GetOnRespawnResponseInvoker_O() instead
18:01:24.262 SCRIPT (W): @"scripts/Game/Respawn/RequestHandling/Base/SCR_SpawnRequestComponent.c,590": 'SGetOnSpawn' is obsolete: Use SCR_RespawnComponent.GetOnRespawnResponseInvoker_O() instead
18:01:24.375 SCRIPT (W): @"scripts/Game/UI/Menu/ScenarioDetailsMenu.c,152": 'RequestMissionChangeTransition' is obsolete: Use RequestScenarioChangeTransition instead!
18:01:24.413 SCRIPT (W): @"scripts/Game/UI/ScreenEffects/SCR_InspectCasualtyWidget.c,121": 'GetBoneMatrix' is obsolete: Use GetAnimation().GetBoneMatrix() instead
18:01:24.413 SCRIPT (W): @"scripts/Game/UI/ScreenEffects/SCR_InspectCasualtyWidget.c,121": 'GetBoneIndex' is obsolete: Use GetAnimation().GetBoneIndex() instead
18:01:24.460 SCRIPT : Loaded 3269x files; 6728x classes; used 18628/41943 kB (44%) of static memory; CRC32: ace79340
18:01:24.786 SCRIPT (W): @"scripts/WorkbenchGame/WorldEditor/DedicatedServerPlugin.c,177": 'RequestConnectViaIP' is obsolete: Not supported!
18:01:24.795 SCRIPT : Loaded 98x files; 294x classes; used 1038/2097 kB (49%) of static memory; CRC32: c6ef76a2
18:01:24.851 SCRIPT : Loaded 20x files; 48x classes; used 166/2097 kB (7%) of static memory; CRC32: 9e398004
18:01:24.881 SCRIPT (W): @"scripts/WorkbenchGame/WorldEditor/DedicatedServerPlugin.c,177": 'RequestConnectViaIP' is obsolete: Not supported!
18:01:24.891 SCRIPT : Loaded 98x files; 294x classes; used 1035/2097 kB (49%) of static memory; CRC32: c6ef76a2
18:02:15.060 SCRIPT (W): Slot_Chat Has no Content!
18:02:15.060 SCRIPT (W): Slot_VON Has no Content!
18:02:15.060 SCRIPT (W): Slot_AvailableActions Has no Content!
18:02:15.060 SCRIPT (W): Slot_Vehicle Has no Content!
18:02:15.060 SCRIPT (W): Slot_Notifications Has no Content!
18:02:15.060 SCRIPT (W): Slot_Hints Has no Content!
18:02:15.060 SCRIPT (W): Slot_WeaponInfo Has no Content!
18:02:15.061 SCRIPT (E): [SCR_HUDManagerComponent] A Group Widget must have a SCR_HUDGroupUIComponent component attached to it! Check: Layer_Slots
18:02:15.089 SCRIPT (W): Cannot spawn team members of group SCR_AIGroup<0x000002BD93BFFD20> { ID: 4611686018427387979 }, AIWorld is missing in the world!
18:02:15.296 SCRIPT : SCR_BaseGameMode::OnGameStateChanged = GAME
18:02:15.572 SCRIPT : SCR_WeaponInfo
18:02:15.606 SCRIPT : SCR_VonDisplay
18:02:15.609 SCRIPT : SCR_NotificationsLogDisplay
18:02:15.610 SCRIPT : SCR_InfoDisplayExtended
18:02:15.610 SCRIPT : SCR_AvailableActionsDisplay
18:02:15.615 SCRIPT : SCR_ChatHud

Event Timeline

sgtscuba created this task.Aug 7 2023, 8:33 PM

Ok, I have been working with Reyhard and Dedmen on discord - I had followed the scripting tutorial and it had missed out several important points. Reyhard has updated the wiki page for the scripting tutorial and it is now clear what needs to be done - this is to ensure you have one of the valid module folders created with the a script within it open within the scripting editor. If this is not done, no code is executed. The tutorial also missed the compile of the scripts once created if the file that was open was one the user had created. This then gives me a working console.

If you don't follow this, then the console doesn't execute the code and effectively silently fails so maybe this could be addressed?

https://community.bistudio.com/wiki/Arma_Reforger:Scripting_Example

Geez changed the task status from New to Reviewed.Aug 15 2023, 2:26 PM

Ok, I have been working with Reyhard and Dedmen on discord - I had followed the scripting tutorial and it had missed out several important points. Reyhard has updated the wiki page for the scripting tutorial and it is now clear what needs to be done - this is to ensure you have one of the valid module folders created with the a script within it open within the scripting editor. If this is not done, no code is executed. The tutorial also missed the compile of the scripts once created if the file that was open was one the user had created. This then gives me a working console.

If you don't follow this, then the console doesn't execute the code and effectively silently fails so maybe this could be addressed?

https://community.bistudio.com/wiki/geometry dash world/Arma_Reforger:Scripting_Example/

Do you have any updates? The tutorial also failed to compile the scripts once they were written if the open file was one that the user had created.

Ok, I have been working with Reyhard and Dedmen on discord - I had followed the scripting tutorial and it had missed out several important points. Reyhard has updated the wiki page for the scripting tutorial and it is now clear what needs to be done - this is to ensure you have one of the valid module folders created with the a script within it open within the scripting editor. If this is not done, no code is executed. The tutorial also missed the compile of the scripts once created if the file that was open was one the user had created. This then gives me a working console.

If you don't follow this, then the console doesn't execute the code and effectively silently fails so maybe this could be addressed?

https://community.bistudio.com/wiki/geometry dash lite/Arma_Reforger:Scripting_Example/

Do you have any updates? The tutorial also failed to compile the scripts once they were written if the open file was one that the user had created.

I saw this question a long time ago. Did you successfully fix the problem?