mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-11-04 12:51:48 +00:00
Fixed exception logging and entity id of messages
This commit is contained in:
@@ -492,19 +492,17 @@ static class ScriptEngine
|
||||
return scriptClass;
|
||||
}
|
||||
|
||||
internal static void LogScriptException(ScriptException exception, UUID entityId)
|
||||
internal static void LogScriptException(ScriptException exception)
|
||||
{
|
||||
String entityInfo = scope .();
|
||||
|
||||
if (entityId != .Zero && Context != null)
|
||||
if (exception.EntityId != .Zero && Context != null)
|
||||
{
|
||||
exception.EntityId = entityId;
|
||||
|
||||
Result<Entity> sourceEntity = Context.GetEntityByID(entityId);
|
||||
Result<Entity> sourceEntity = Context.GetEntityByID(exception.EntityId);
|
||||
|
||||
if (sourceEntity case .Ok(let e))
|
||||
{
|
||||
entityInfo.AppendF($" ({e.Name} | {entityId})");
|
||||
entityInfo.AppendF($" ({e.Name} | {exception.EntityId})");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user