Fireboyd78 Posted June 1, 2015 Share Posted June 1, 2015 (edited) Pretty much sums it up. If you're on the regular desktop version of this site, the following code will look all messed up: --[[this is supposed to bea multi-line commentbut it doesn't work!--]]-- add two numbers and return the sumfunction add(x,y) return x + yend-- setup our variableslocal val1 = 0local val2 = add(val1, 4)-- print valuesprint("val1: "..val1)print("val2: "..val2)local timer = 0-- assuming the "tick" function is called every frame or sofunction tick() if timer >= 50 then -- do something after 50 ticks -- [...] -- reset timer after you're done timer = 0 else -- add to the timer timer = timer + 1 endendOn a side note, the "None" code type doesn't actually work, at least on the desktop version. See: above Edited June 1, 2015 by CarLuver69 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now