ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. getResourceLoadFailureReason

Function

getResourceLoadFailureReason

ServerResourcesIdentical to MTA:SA

Returns why a resource failed to start. An empty string = no error. In the current server version it always returns an empty string; load errors show up in the server console.

Syntax

string getResourceLoadFailureReason(resource theResource)

Arguments

theResourceresource
The resource.

Returns

The reason or "".

Example

local res = getResourceFromName("race")
if not startResource(res) then
    outputServerLog("race: " .. getResourceLoadFailureReason(res))
end

See also