Prevent running crossfire.lua if crossfire not available
Checks if crossfire is available before running crossfire.lua. Exits the script and shows an error message if not.
This commit is contained in:
@@ -30,6 +30,11 @@ local function run(event)
|
||||
return 2
|
||||
end
|
||||
|
||||
if crossfireTelemetryPush() == nil then
|
||||
error("Crossfire not available!")
|
||||
return 2
|
||||
end
|
||||
|
||||
chdir("/SCRIPTS/TOOLS/CROSSFIRE")
|
||||
return "crossfire.lua"
|
||||
end
|
||||
|
||||
@@ -30,6 +30,11 @@ local function run(event)
|
||||
return 2
|
||||
end
|
||||
|
||||
if crossfireTelemetryPush() == nil then
|
||||
error("Crossfire not available!")
|
||||
return 2
|
||||
end
|
||||
|
||||
chdir("/SCRIPTS/TOOLS/CROSSFIRE")
|
||||
return "crossfire.lua"
|
||||
end
|
||||
|
||||
@@ -30,6 +30,11 @@ local function run(event)
|
||||
return 2
|
||||
end
|
||||
|
||||
if crossfireTelemetryPush() == nil then
|
||||
error("Crossfire not available!")
|
||||
return 2
|
||||
end
|
||||
|
||||
chdir("/SCRIPTS/TOOLS/CROSSFIRE")
|
||||
return "crossfire.lua"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user