mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-10-27 18:59:32 +01:00
error handling
Co-authored-by: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
This commit is contained in:
parent
b31b005bdd
commit
e82c8b1e81
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user