rpgtoolkit / trans3

The Official GitHub repository for the RPG Toolkit Engine version 3.
http://www.rpgtoolkit.net
12 stars 2 forks source link

end() doesn't work inside rpgCode() function. #48

Closed NotTooManyItems closed 10 years ago

NotTooManyItems commented 10 years ago

end() doesn't work inside rpgCode() function.

Works: [code] end(); wait(); [/code]

Doesn't work: [code] rpgCode("end()"); wait(); [/code]

A test with different rpgcode. Works: [code] rpgCode("window()"); wait(); [/code]

swordmaster2k commented 10 years ago

Not a bug, this is the behaviour of end.

As stated by O_C

"It does work. That isn't a bug. The windows() function makes Trans3 quit regardless of where it's run. The end() function only ends the current program. The rpgcode() function works by creating a new program in memory, so using end() within it will only end the execution of whatever's within the "scope" of rpgcode(). You can see that this works with this example...

rpgcode("end(); show(9)"); wait();"