amnesia-spelos / amnesia-spelos/amnesia-tdd-tcp
Return script compilation result on exec:
- Dominant language
- C++
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
> 🏝️ **Want to work on this issue?**
> _Comment down below and we'll gladly assign it for you. No rush, no worries, we'll help you out if you get stuck._ 🌞
>
> If this is your first time contributing, see the [setting up the development environment](https://github.com/amnesia-spelos/amnesia-tdd-tcp/wiki/dev-env-setup) for a quick start.
## Summary
Currently, the `exec:` command returns `RESPONSE:exec:script executed`. If the script fails for whatever reason, the client is never told about the reason and the script fails silently.
Amnesia already has a feature to compile the script file with output:
```cpp
mpEngine->GetResources()->GetScriptManager()->CreateScript(sScriptFile, apOutput);
```
You can see this line along with its usage in [LuxMap.cpp#L421](https://github.com/amnesia-spelos/amnesia-tdd-tcp/blob/main/src/amnesia/src/game/LuxMap.cpp#L421).
We should be returning the output as part of `RESPONSE:exec`.
## Current Implementation
You can find the current implementation in the following file:
https://github.com/amnesia-spelos/amnesia-tdd-tcp/blob/c17c8b05f6d03249e844dd753405654f8412a713/src/amnesia/src/game/LuxSocketServer.cpp#L199-L211
Contributor guide
Assessment
This issue has not been assessed yet.