I've shorten few of your functions (haven't seen the others, since i haven't downloaded TFS yet loool)
Your isNumber function frightened me
And here's a function you might want to add too
PHP:
function getArticle(str)
return str:find("[AaEeIiOoUu]") == 1 and "an" or "a"
end
PHP:
function isNumber(str)
return tonumber(str) ~= nil and TRUE or FALSE
end
Your isNumber function frightened me
And here's a function you might want to add too
PHP:
function isInArea(pos, fromPos, toPos)
-- by Colandus
if pos.x >= fromPos.x and pos.x <= toPos.x then
if pos.y >= fromPos.y and pos.y <= toPos.y then
if pos.z >= fromPos.z and pos.z <= toPos.z then
return true
end
end
end
return false
end
Last edited: