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
1 changed files with 4 additions and 4 deletions

View File

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