function : a stop statement ?

Discussion and feedback on Construct 2

Post » Mon Feb 16, 2015 3:14 pm

Hello,

Is somebody know if the function object have a statement to stop the function ?
I thought it was the "set return value" (like "return" in Javascript or PHP) but it's not the case.

if a statement like this don't exist, it may be a good idea to create one.
;)
B
8
S
1
G
1
Posts: 9
Reputation: 1,236

Post » Mon Feb 16, 2015 3:33 pm

umm. nope. Unlike traditional programming where return prematuraly exits. You best bet is to follow the other function design.

function()
if{ do stuff }
if{do stuff}
function end

make sure anything you want to do is in a conditional statement and let the function run it's course.
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,013

Post » Tue Feb 17, 2015 3:38 pm

Thanks for your answer, Jayderyu.
I already use this design but I thought there was a better method.
B
8
S
1
G
1
Posts: 9
Reputation: 1,236


Return to Construct 2 General

Who is online

Users browsing this forum: pixelink, TheRealDannyyy and 8 guests