error handling

Co-authored-by: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
This commit is contained in:
VorTechnix 2021-02-28 07:25:31 -08:00 committed by GitHub
parent b31b005bdd
commit e82c8b1e81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -51,10 +51,10 @@ function worldeditadditions.getsign(str, type)
return false, "Error: Unknown type '"..type.."'." return false, "Error: Unknown type '"..type.."'."
end end
if str:sub(1, 1) == "-" then if str:sub(1, 1) == "-" then
if type == "int" then return -1 if type == "int" then return true, -1
else return "-" end else return true, "-" end
else else
if type == "int" then return 1 if type == "int" then return true, 1
else return "+" end else return true, "+" end
end end
end end