mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
18 lines
792 B
C
18 lines
792 B
C
#pragma once
|
|
#include "framework.h"
|
|
|
|
#define PROTECTED_CALL "Olympus = {}\n \
|
|
function Olympus.protectedCall(...)\n\n \
|
|
local status, retval = pcall(...)\n \
|
|
if not status then\n \
|
|
if Olympus.log ~= nil then\n \
|
|
Olympus.log:error(retval)\n \
|
|
else\n \
|
|
trigger.action.outText(\"Olympus critical error: \" ..retval, 20)\n \
|
|
end\n \
|
|
end\n \
|
|
end\n \
|
|
trigger.action.outText(\"Olympus.protectedCall registered successfully\", 10)\n"
|
|
|
|
void registerLuaFunctions(lua_State* L);
|