mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-08-18 22:36:04 +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
|
--- end
|
||||||
--- ```
|
--- ```
|
||||||
function isStarted(script)
|
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
|
return GetResourceState(script):find("start") ~= nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user