ChoicescriptIDE / main

32 stars 6 forks source link

Quick Test doesn't work with gosub_scene that has parameters #113

Closed Narmical closed 3 years ago

Narmical commented 3 years ago

Quick Test doesn't work with gosub_scene that has parameters, ex *gosub_scene print_emoji_new print "😵" your_confusion

The error I get is ERROR: couldn't open print_emoji.txt

I tried running these same scene files though the quick test on the latest choice script and that worked wonderfuly.

My assumption is that this is an error in the version of choice script the IDE was compiled against. I installed the latest release from here, but that was built back in 2018.

Is there a plan to upload a newer release? I see checkins from this week.

If not' ill try to build myself in the meantime.

Thanks for this wonderful too. Its super good and I love it

CareyJWilliams commented 3 years ago

Thanks for reporting this. I'm surprised no one has stumbled across this before (myself included)! There's no public release past v1.3.1 yet. I've begun committing stuff for v1.4, hence the activity, but none of it has been 'tested'.

I'll look into this a bit more, and if it's an easy fix, I'll look at a v1.3.2 hot fix.

EDIT: Adding the scene to a *scene_list in startup.txt seems to get me a little further, but then I get an error related to *params: TypeError: Cannot read property 'length' of undefined

CareyJWilliams commented 3 years ago

OK, this looks like a deliberate Quicktest omission: https://github.com/dfabulich/choicescript/commit/bff6a04dca70db149625e5cbc4e4baa46bab0afa#diff-163652f98fb635cbb25c0303865518410f613332c01397e59f65f03f0f7ffbca

Having 'addFile(...)' at the parameter comment 'resolves' it.

This hasn't been patched over either. I imagine the only reason this is working with the latest ChoiceScript is because, outside of CSIDE, you now 'upload' all your scene files for Quicktest (meaning all scenes are known ahead of time -- meaning the absence of addFile here isn't an issue).

TypeError: Cannot read property 'length' of undefined

And this was due to another Quicktest quirk and can be avoided with a well-placed *bug command: https://forum.choiceofgames.com/t/strange-quicktest-issue-with-subroutines/37651/10?u=cjw


So the tl;dr is that it looks intentional for whatever reason. Still, you can quite easily work around it by adding the scene to your scene_list, and possibly adding *bug to the top of a few scene files. That should get you working again.

I've changed how the tests are run for v1.4, so I think this 'issue' will disappear for that. As there's an easy enough workaround I don't think I'll push a patch for v1.3.X.

Narmical commented 3 years ago

Thanks so much for this info!

I did not have all my scene files listed in the start up so i'll give that a try along with the *bug command

Your choice script IDE is super cool and I appreciate it very much.

I had an unrelated question and I think you would know the answer. The current IDE has a menu option to compile your whole game into a single HTML file. Is there a way to do that from the command line? I'm thinking of trying to set up a CI environment and that's my stumbling block.

Dr. Heather Morris

On Sun, Jan 3, 2021 at 5:59 PM Carey Williams notifications@github.com wrote:

OK, this looks like a deliberate Quicktest omission: dfabulich/choicescript@bff6a04

diff-163652f98fb635cbb25c0303865518410f613332c01397e59f65f03f0f7ffbca

https://github.com/dfabulich/choicescript/commit/bff6a04dca70db149625e5cbc4e4baa46bab0afa#diff-163652f98fb635cbb25c0303865518410f613332c01397e59f65f03f0f7ffbca

Having 'addFile(...)' at the parameter comment 'resolves' it.

This hasn't been patched over either. I imagine the only reason this is working with the latest ChoiceScript is because, outside of CSIDE, you now 'upload' all your scene files for Quicktest (meaning all scenes are known ahead of time -- meaning the absence of addFile isn't an issue).

TypeError: Cannot read property 'length' of undefined

And this was due to another Quicktest quirk and can be avoided with a well-place *bug command: https://forum.choiceofgames.com/t/strange-quicktest-issue-with-subroutines/37651/10?u=cjw

So the tl;dr is that it looks intentional for whatever reason. Still, you can quite easily work around it by adding the scene to your scene_list, and adding possibly adding *bug to the top of a few scene files. That should get you working again.

I've changed how the tests are run for v1.4, so I think this 'issue' will disappear for that. As there's an easy enough workaround I don't think I'll push a patch for v1.3.X.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ChoicescriptIDE/main/issues/113#issuecomment-753688593, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ3J2DHGTO7PFNUKWWP3C3SYDZFFANCNFSM4VOR4JVQ .

CareyJWilliams commented 3 years ago

Glad you're enjoying it.

There's no CLI interface for any of CSIDE's functions. The best way to setup CI would be to use the original ChoiceScript repository: https://github.com/dfabulich/choicescript.

You can run the files contained there (for e.g. compile.js) with Node.js.

If you're using Github for your CI you can actually use a Github action 'setup-node' to streamline things. See: https://github.com/ChoicescriptIDE/choicescript/blob/master/.github/workflows/test.yml for an example.

Narmical commented 3 years ago

Thanks!!! That was just the tip I needed :D

On Wed, Jan 27, 2021, 1:44 PM Carey Williams notifications@github.com wrote:

Glad you're enjoying it.

There's no CLI interface for any of CSIDE's functions. The best way to setup CI would be to use the original ChoiceScript repository: dfabulich/choicescript.

You can run the files contained there (for e.g. compile.js) with Node.js https://nodejs.org/en/.

If you're using Github for your CI you can actually use a Github action 'setup-node' to streamline things. See: https://github.com/ChoicescriptIDE/choicescript/blob/master/.github/workflows/test.yml for an example.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ChoicescriptIDE/main/issues/113#issuecomment-768493176, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ3J2ECBFKLO4YXN3IOB6LS4BNKTANCNFSM4VOR4JVQ .