Comments/Ratings for a Single Item
I have a preset for one of my new games. Once after saving the preset I could not access it anymore as I get a totally white window. I use microsoft edge. What happens?
My best guess is that your code contains an infinite loop. You can figure things out more precisely by going here:
- Save each block of code to a text file on your computer.
- Delete each full block of code in turn until you determine which block of code is causing this to happen.
- Restore your code from your backup.
- Working with the block of code that is buggy, delete or comment out large portions of it to determine where the problem lies. Make sure that each portion you delete or comment out can be safely removed without breaking up control structures.
- Once you isolate the problem to a large section, delete or comment out smaller parts of that section until you find the line that is causing your problem.
- Examine that line to figure out what the problem is, fix it, and see if it fixes your problem.
@Fergus It seems that the infinite loop was caused by the following code:
setelem op .JW + elem .JW op 1; setelem op .jw + elem .jw op 1;
.jw is the wazir camel piece and I had wanted to to increase the number of them in reserve. Probably the dot is causing trouble. Do you agree?
@Fergus It seems that the infinite loop was caused by the following code:
setelem op .JW + elem .JW op 1; setelem op .jw + elem .jw op 1;
That's two lines of code. In the first line, you are trying to increment #op[".JW"] by one, and in the second, you are trying to increment #op[".jw"] by one.
.jw is the wazir camel piece and I had wanted to to increase the number of them in reserve. Probably the dot is causing trouble. Do you agree?
Yes, it looks like it is causing trouble. In a test I ran, it incremented #op["JW"] and #op["jw"] by one instead of the elements you named. This is probably because the period is now used as a separator between array and element names, and the setelem command now just concatenates the array and element names by putting a period between them, and uses this concatenated name with the function for setting a user variable.
What I would recommend is to follow the instructions I have previously given for replacing piece labels without using aliases, which is in the comments for the Game Courier Developer's Guide. This would give you nice clean piece labels that you can use in your code without running into problems like this.
The comments section of the developer guide does not work on edge!
Works now. Don't worry.
6 comments displayed
Permalink to the exact comments currently displayed.
@Fergus
https://www.chessvariants.com/play/pbm/play.php?game=Grand+Apothecary+Chess+3&settings=Default
In the link above I have a preset for one of my new games. Once after saving the preset I could not acces it anymore as I get a totally white window. I use microsoft edge. What happens?