initial release

This commit is contained in:
Draqoken
2025-07-01 23:28:00 +03:00
commit e888d9dfb9
250 changed files with 132057 additions and 0 deletions

29
cosmic rage/lua/check.lua Normal file
View File

@@ -0,0 +1,29 @@
--
-- check.lua
--
-- ----------------------------------------------------------
-- return-code checker for MUSHclient functions that return error codes
-- ----------------------------------------------------------
--
--[[
Call for those MUSHclient functions that return a result code (like eOK).
Not all functions return such a code.
eg.
require "check
check (SetVariable ("abc", "def")) --> works ok
check (SetVariable ("abc-", "def")) --> The name of this object is invalid
--]]
function check (result)
if result ~= error_code.eOK then
error (error_desc [result] or
string.format ("Unknown error code: %i", result),
2) -- error level - whoever called this function
end -- if
end -- function check
return check