diff --git a/src/ai.c b/src/ai.c index aae8f2f..dda9cef 100644 --- a/src/ai.c +++ b/src/ai.c @@ -296,9 +296,10 @@ static int ai_loadProfile(char* filename) { /* Now load the file, since all the functions have been previously loaded. */ buf = pack_readfile(DATA, filename, &bufsize); if(luaL_dobuffer(L, buf, bufsize, filename) != 0) { - ERR("loading AI file: %s", filename); - ERR("%s", lua_tostring(L, -1)); - WARN("Most likely Lua file has improper syntax, please check it."); + ERR("Error loading AI file: %s\n" + "%s\n" + "Most likely Lua file has improper syntax, please check.", + filename, lua_tostring(L, -1)); return -1; } diff --git a/src/music.c b/src/music.c index 4706871..99828d6 100644 --- a/src/music.c +++ b/src/music.c @@ -384,9 +384,10 @@ static int music_luaInit(void) { /* Load the actual lua music code. */ buf = pack_readfile(DATA, MUSIC_LUA_PATH, &bufsize); if(luaL_dobuffer(music_lua, buf, bufsize, MUSIC_LUA_PATH) != 0) { - ERR("Error loading music file: %s" MUSIC_LUA_PATH); - ERR("%s", lua_tostring(music_lua, -1)); - WARN("Most likely lua file has improper syntax, please check"); + ERR("Error loading music file: %s\n" + "%s\n" + "Most likely Lua file has improper syntax, please check", + MUSIC_LUA_PATH, lua_tostring(music_lua, -1)); return -1; } free(buf);