mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-08-17 05:56:02 +01:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user