--SITUATION 1:. --This will work, won't it? function round_to_number(n, r) n = n/r n = math.floor(n) n = n*r return n end function multiply_and_round(n, e) n = n * e if (n > 1000) then n = round_to_number(n, 50.0) else n = round_to_number(n, 5.0) end return n end --No.. this time, it "quiet-breaks". The code doesn't work without warning why. --The number is unmodified. Somewhere, the function(s) stopped working. SITUATION 2: --I have until now relied on an unelegant and ugly solution of modifying units. Behold: if (ud.name == "Conjurer") or (ud.name == "Glaive") or (ud.name == "Ronin") or (ud.name == "Reaver") or (ud.name == "Knight") or (ud.name == "Sling") or ... (it continues like this for 109 lines) --This is a list containing all units and turrets, except gunships and airplanes. --I wish for gunships and airplanes to be modified too, but for some reason the code "quiet-breaks" when I add them to the list. Maybe there is a limit to the number of "or" statements. --So, I try something different. function n_in_table(n, table) for k, v in pairs(table) do if (n == v) then return true end end return false end local cloakbots = {"Conjurer", "Glaive", "Ronin", "Reaver", "Knight", "Sling", "Scythe", "Gremlin", "Phantom", "Imp", "Iris"} if n_in_table(name, cloakbots) then ... -- This functions works in any online lua compiler. -- It does not work ingame. No idea why, no explanation why, it simply "quietbreaks".