skittles sour Posted April 26, 2021 Share Posted April 26, 2021 Hi so I'm trying to use the goto statement here, but I get the error message "= expected near continue", which means, it seems to me, that "goto" was not registered as a statement, but instead as a variable. Am I doing something else wrong? Or is the "goto" statement invalid in the Lua that DST uses? for k, stage in pairs(inst.components.growable.stages) do print('speeding up growth', k, stage, stage.time) if not stage.time then goto continue end if type(stage.time) == 'function' then local old = stage.time stage.time = function(...) return old(table.unpack{...}) / GrowthMultiplier end elseif type(stage.time) == 'number' then stage.time = stage.time / GrowthMultiplier end ::continue:: end Link to comment Share on other sites More sharing options...
penguin0616 Posted April 26, 2021 Share Posted April 26, 2021 Lua 5.1 does not have goto, it was introduced in 5.2. DST uses Lua 5.1. 1 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