oop i see what i did wrong. Thank you so much!
No problem! Glad it worked out for you!
RANDOMTEST FAILED: Error: startup line 87: Non-existent command āsm_initā
This error appeared when I ran the Random Test.
The demo works fine if I run it manually, Iām just wondering if I did something wrong.
All I did was follow your instructions which was to add this
*sm_init mygame | 3 command right after my variable startup.
I think Randomtest and Quicktest canāt run any save system commands. You have to remove the commands or comment them out to run automated testing.
Thanks for that, Iāve been pulling my hair. Trying to get everything to work.
You can put it in an *if
clause, too:
*if not(choice_randomtest)
*sm_init gamename | 3
I donāt know if thereās an equivalent for Quicktest (like choice_quicktest
); I never really used Quicktest while I was developing my gameā¦
Just as an aside, I would recommend not using mygame
as your game name, or itāll clash with any other game that uses that; itās best to stick to something unique.
Iāll try that
The quicktest doesnāt bother me that much. It keeps sending me errors about my subroutines. Though when played manually, the demo works fine.
I actually did it. All hail @CJW and @Malebranche, thanks for the help guys
Still works?
Should do.
Links and imagens are broken here! Can you help me?
Sorry, Iām new here, just building my first game!!
image
Press chain icon to hyperlink. You can also drag and drop the image into reply box.
The big problem is that there is no save.js to download!
I think this is the file there!
You donāt need save.js. Download from this thread smPlugin.js and smPluginMenuAddon.js. Put both in choicescript\web folder. Then with notepad add following lines to the choicescript\web\mygame\index.html
<script src="../smPlugin.js"></script>
<script src="../smPluginMenuAddon.js"></script>
Put these 2 lines between scene.js and navigator.js. Add *sm_init mygame | 5
to the startup.txt, after all of your declared variables. Should work after that.
@anon8836198 worked! Thank you very much!
@CJW thank you! It helped a lot!
Thank you for helping @Yamanokami out @anon8836198. I admit the thread structure is a bit dated and messy, Iāll see about tidying it up.
Glad the plugin is still helping people!
Hello, Iām new to ChoiceScript and when I heard that you can add a save feature I was so excited. But apparently it was a bit confusing on learning on how to use it and what to add. I had to read all the comments, from first to the very latest (456 comments were there I think), until after so many hours of reading and rereading and typing, it finally works! Thanks @CJW! (I just felt like I really needed to say thanks, as Iām full of happiness for finally getting it Also I hope my message isnāt a burden so please ignore if itās badā¦)
Hi,
Iām just implementing the plugin. Running my game and loading I receive error message:
invalid line; this line should have a scene name followed by an error message
I can see this crops up in WIP beta feedback, but havenāt yet found what the solution is (or whatās causing it). Anyone able to help?
Thanks.
Full message:
Error: chapter_01_the_carpenter__ria line 143: invalid line; this line should have a scene name followed by an error message: *if ((reread = false) or ((c_m_z#jump_to_page_minus_one) = 0))
This is interchangeableāthe message will appear referring to a different line number if Iām loading from a later page. It always refers to a choice on that page. Eg:
Error: chapter_01_the_carpenter__ria line 196: invalid line; this line should have a scene name followed by an error message: *if ((reread = false) or ((c_m_z#jump_to_page_minus_one) = 0))
The referenced code looks like this:
*fake_choice
*if ((reread = false) or ((c_m_z#jump_to_page_minus_one) = 0))
#Turn the page.
*if reread = false
*set c_m 0
*if not (((choice_randomtest) or (reread)) or (skip_forward))
#Menu.
*gosub_scene operation_menu
*if (reread)
#Return to page ${p}.
*goto_scene operation_reread_skip_forward return_to_page_choice
- Issue replicated on firefox (using index.html) and through dashingdon.
- Did this
- Did this:
- Did this
This usually happens if you try to load a save from an old file. That is, loading a save after you made changes to your game.
Thanks so much for the reply.
I have double-checked, but:
- having deleted the save,
- then saved a new save
- then loaded that save
I still get that error message, despite no changes having been made to txt files, (and no progress in game)