mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2025-03-28 11:32:31 +01:00
error handling
Co-authored-by: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user