Support for new version of CreatureLib.
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2020-02-28 19:51:50 +01:00
parent dba8ae2b83
commit 29a82a5e75
19 changed files with 113 additions and 100 deletions

View File

@@ -21,7 +21,7 @@ public:
~AngelScriptScript() override { _obj->Release(); }
[[nodiscard]] const std::string& GetName() const override { return _type->GetName(); }
[[nodiscard]] const ConstString& GetName() const override { return _type->GetName(); }
asIScriptFunction* PrepareMethod(const char* name, asIScriptContext* ctx) {
auto func = _type->GetFunction(name);
@@ -51,7 +51,7 @@ public:
if (scriptResult != asEXECUTION_FINISHED) { \
if (scriptResult == asEXECUTION_EXCEPTION) { \
std::stringstream err; \
err << "Script exception in script '" << GetName() << "', line " << ctx->GetExceptionLineNumber() \
err << "Script exception in script '" << GetName().c_str() << "', line " << ctx->GetExceptionLineNumber() \
<< ". Message: '" << ctx->GetExceptionString() << "'."; \
throw CreatureException(err.str()); \
} \