public void ReadAndExecute(string eventScript) { GameAction action = interpreter.MakeEvent(eventScript, GameManager.instance.eventManager.InterpreterError); if (action != null) { try { action.Execute(); } catch (ScriptInterpreter.InterpreterException e) { GameManager.instance.eventManager.InterpreterError.Invoke(e.ToString()); } catch (System.Exception e) { GameManager.instance.eventManager.InterpreterError.Invoke("Unknown interpreter error - check your script.\n" + e.ToString()); } } }