From 8b171e3a7e006aa492e2369969999a2336e2a731 Mon Sep 17 00:00:00 2001 From: Philipp Sehmisch Date: Sat, 17 Jan 2009 16:21:58 +0100 Subject: Made script error reports more informative and readable --- src/scripting/script.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/scripting/script.cpp') diff --git a/src/scripting/script.cpp b/src/scripting/script.cpp index ea1721f9..a20efb5c 100644 --- a/src/scripting/script.cpp +++ b/src/scripting/script.cpp @@ -69,14 +69,18 @@ void Script::update() execute(); } -void Script::loadFile(std::string const &name) +bool Script::loadFile(std::string const &name) { int size; char *buffer = ResourceManager::loadFile(name, size); if (buffer) { + mScriptFile = name; load(buffer); free(buffer); + return true; + } else { + return false; } } -- cgit v1.2.3-60-g2f50