update isStarted() fuction

Add fallback for if somehow the script name being checked was sent as `nil`, if `nil` it returns false
This commit is contained in:
Jim Shield
2025-05-07 13:56:26 +01:00
parent 6b8698353b
commit 3b768d5c7d

View File

@@ -21,6 +21,10 @@
--- end
--- ```
function isStarted(script)
if not script then
print("^1Error^7: ^1Tried to check if ^3nil^2 was started^7, ^1returning ^4false^7")
return false
end
return GetResourceState(script):find("start") ~= nil
end