getResourceLoadFailureReason | Multi Theft Auto: Wiki Skip to content

getResourceLoadFailureReason

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function retrieves the reason why a resource failed to start.

Syntax

getResourceLoadFailureReason ( )

Code Examples

server

This example checks if there's a resource that failed to load, then outputs "Resource: 'resourceName' failed to load because 'reason'." .

for _,v in ipairs(getResources())do --loop through all the resources
if getResourceState(v)=="failed to load" then --check if it failed to load
outputChatBox("Resource: "..getResourceName(v).." failed to load because: "..getResourceLoadFailureReason(v)..".") --output why it didn't load
end
end