Ability to look at game errors

So, Not quite sure what catagory this is supposed to go in, so hear goes.

Apart from the streight-up coding errors that I find when I test my game, the highest percentage of errors that I usually come across have to with spelling. Unfortunatly, I don’t know how to check the spelling of the error against the spelling found in any of my files. As such, would anyone have an idea as to how to do that? (my screen reader reads words, and not letters, and I would rather not change it, as it would then read the entire error, letter by letter, out-loud.)

I’ve put this into ChoiceScript Help, though it doesn’t strictly seem like a ChoiceScript issue.

My not-very-techy method is to copy my text into a google doc (or you could use Word if you have it) and do a spellcheck. It won’t find everything and it’s tedious to click ignore when it reports things it doesn’t need to, so others will probably have better methods.


It depends on the software you’re using. As Hannah says, for notepad or basic text editors, you’ll probably need to copy the text into another program.

If you’re using an editor that supports plugins, like VS Code, you should be able to find and configure a spell check plugin in the application.

Similarly CSIDE also has a rudimentary built-in spell check.

1 Like

I was more thinking along the lines of, say, the variables being spelled slightly differently between the startup file and the current file, and I, currently, don’t have a better solution to finding out which is which by manually finding each and cross-referencing it. Which mostly works, but not always.
Right now I’m trying to find a way to look over the exact error text to check the spelling of it VS the variables and such I have in the startup, as right now, I can’t do that. It tells me what’s wrong, as in the particular error that’s being thrown up, such as:

highest_relationships line 15: unknown variable: relationship_name5

But, if it’s something like different spellings of, say, relationship between the variable that’s throwing up the error and the startup file, then the only way I can find that out right now is by going to each and manually checking it. Just figured it would be easier to grab it right off the errors and go from there.

When I need to find all instances of a certain variable in my code, I usually use Notepad++. CSIDE is great, but Notepad++ has a very robust search function with some important settings, like case-matching, that are specifically relevant for situations like a misspelled or mistyped variable name.

1 Like

I find Quicktest (Automatically testing your game | ChoiceScript Wiki | Fandom) very good for catching mispelled/non-existent variables.

I have notepad plus plus, it’s just that this time, it’s saying that the error doesn’t exist in the document, let-alone that it’s not where the error says it is to begin with.
Looking into quickest now, had issues with it before, but now I think that mostly had to do with the fact that I was clicking the wrong quickest. With that being said though, where does the error file end up? Is there a particular directory in the choicescript folder that it’s shunted into by default?

Good question and I have no idea (or even if such a file exists). I just run quicktest.html (from the top directory), select the project directory (web/myproject) and then read the output on the screen.
In fact, testing this just produced an error for me:
Error: river line 246: bad label text_small_island
so thanks - I’d better go and fix it…

Edit: in case you haven’t already found it, this is probably a better explanation than the wiki:

Firstly, just for reference, and reassurance, I guess, which quick test do I open? As there are three of them. Secondly, would you be able to turn those JPEG‘s into actual explanations if it isn’t too much trouble? As my screen reader doesn’t really do well with them, and basically just says JPEG and then that’s it. Shrug.

OK, this is what I do. I am using a Mac with a Firefox browser (there may be issues with Chrome - I’m not sure).

You ChoiceScript engine is in a directory called something like: dfabulich-choicescript-47288f1. In this directory is a file called quicktest.html.

Step 1: You will need to download node.js from Node.js if you haven’t already done so.

Step 2: Copy quicktest.html to your project directory dfabulich-choicescript-47288f1/web/whatever_your_project_folder_is_called (if you have gone with the default, it will be called “mygame”)

Step 3: Open dfabulich-choicescript-47288f1/quicktest.html in your browser (File/Open File).

Step 4: I now get a message that says: “Please “upload” your choicescript folder (including quicktest.html).” and a Browse button. Browse to your project directory (see above) and select it.
Depending on your browser settings, you may be asked to confirm this.

When you upload the file, quicktest should run in the browser and give you the test output.

There may be other ways of doing it, but this works for me.

If you are using Windows/Explorer/Chrome/etc, the details of the GUI may vary.

So, when I try to open the quickest or randomtest, it asks me how I want to open the file, but before I can do anything, it returns to the directory, as in, I don’t have enough time to even see my options to open the file, let-alone do anything about it.

That I haven’t encountered. What O/S and browser are you using? (BTW I am specifically talking about quicktest - I’ve had some issues with randomtest)

I’m using a Windows system, with fire fox set as my default browser. Not that it gets that far, but yeah.

Not sure I can help then - I don’t have access to a Windows box. I’m not quite clear on whether you are doing this or not, but I recommend opening the browser first, then choose Open File… from the File menu, rather than trying to open it via Explorer.
Other than that, you need someone with Windows.

I will have to check again to confirm, but the last time I tried opening quick test, and or random test through the pop-up in fire fox, quick test, and random test did not show up.
I will see if I can just drag and drop it into the fire fox search bar, hopefully that solves the problem.