Sign in to follow this  
Argonium

Is "continue" missing in DS?

Recommended Posts

Argonium    5

I usually use "continue" in loops to remove unwanted things, but its missing? Is there any "continue" statement in DS/DST?

Share this post


Link to post
Share on other sites
Ultroman    695

It's not DS/DST that doesn't have "continue". Lua, the scripting language we write mods in, doesn't have "continue" :)

It has "break" and "goto", which can be used to sort of mimic a "continue" (read the two top answers AND the comments(!!!))), but those workarounds are generally disliked, so we just try to write our code in ways which do not require a "continue" (like the link shows). Usually, this results in nested if-statements and/or subsequent if-statements and the use of a bool saying whether to skip the rest of the if-statements (which all check that that bool is not true before doing their actual checks).

 

Edited by Ultroman

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this