Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
Advertisement Create a free account Compendium in Game, Join Today

Foudn a pre-defined key order!

1486651222
Laurent
Pro
Sheet Author
API Scripter
Would it be possible to get rid of that message "Foudn a pre-defined key order!"? It is flooding my API Console...
1486666938
Silvyre
Forum Champion
Which script is generating it? You might check by systematically disabling scripts.
1486983623
Laurent
Pro
Sheet Author
API Scripter
It seems to be generated after each call to getAttrByname for a repeating attribute, but only for one particular character.
1486990114
Silvyre
Forum Champion
If you Transmogrify/Vault that Character over to another Game, does the issue persist?
1486992850
Laurent
Pro
Sheet Author
API Scripter
Yes, it does. 
1486993424

Edited 1486993456
Silvyre
Forum Champion
Does this Character predate the Dec 15th updates to repeating sections ? It sounds like this Character may have a broken repeating section. If you're able to pinpoint the precise repeating section that Character is experiencing issues with, I would try deleting every repeatingrow within that section, and see if the issue persists after readding some repeatingrows.
1486997931
Laurent
Pro
Sheet Author
API Scripter
Yes, the character predates the update on repeating sections. I tried deleting the section which seems to be involved, and then added one element back. I still get the same message.
1487024006
Silvyre
Forum Champion
What's the name of the Game, Character and repeating section in question?
1487057702
Laurent
Pro
Sheet Author
API Scripter
One example game on which I'm working is "Copy", the name of the character is "Turbuline", and the repeating section I suspect is "repeating_armes"
1487060255
Silvyre
Forum Champion
Thank you. I've brought your issue to the attention of the Roll20 Dev Team.
1487061153
Laurent
Pro
Sheet Author
API Scripter
Thank you for your support. Meanwhile, since it concerns only one character, I decided I would copy it from scratch (by hand, no transmogrifier). I just don't know where to find the avatar file of the original character to copy or upload it to the copy character. How should I proceed?
1487061458
Silvyre
Forum Champion
If you cannot find it within your Art Library, I would right click on the Avatar image, save it to your computer and then re-upload it as an Avatar for your new Character.
1487063362
Laurent
Pro
Sheet Author
API Scripter
With the new copy from scratch, I don't see the message anymore.
1487063480
Laurent
Pro
Sheet Author
API Scripter
But I can reproduce the issue by changing the order of the elements in the repeating section.
1487063620
Laurent
Pro
Sheet Author
API Scripter
From that point on, I get the message, even if I re-order the repeating section, or empty and refill it.
1487063979
Silvyre
Forum Champion
Could you post a github link to the Character Sheet's HTML? Also, could you please either list the precise steps it would require to reproduce this issue on a fresh Character, or provide a .gif demonstration ? Thank you.
1487064497
Laurent
Pro
Sheet Author
API Scripter
The Character Sheet is the following :&nbsp; <a href="https://github.com/Roll20/roll20-character-sheets/tree/master/ChroniquesOubliees" rel="nofollow">https://github.com/Roll20/roll20-character-sheets/tree/master/ChroniquesOubliees</a>
1487065840
Laurent
Pro
Sheet Author
API Scripter
Here is a gif where I started from a fresh character:&nbsp;
1487066434

Edited 1487066451
Silvyre
Forum Champion
Is that "COFantasy" script the only API Script that you are running? Could you provide a link to it?
1487067436
Laurent
Pro
Sheet Author
API Scripter
I run the Vector Math script too.
1487068406
Laurent
Pro
Sheet Author
API Scripter
My "COFantasy" script is about 4000 lines of code, so I tried again with a simpler script: on("chat:message", function (msg) { "use strict"; if (msg.type != "api" || msg.content != "!foudn") return; var characters = findObjs({_type:'character'}); if (characters.length &gt; 0) { var charId = characters[0].id; getAttrByName(charId, "repeating_armes_$0_armenom"); log("Weapon found"); } else { log("No character"); } }); Here is usage that results in the "foudn" message:
1487069625
Silvyre
Forum Champion
Thank you; that's very helpful.
1488482530
Kristin C.
Roll20 Team
We've assembled a bug ticket to dig into this, Laurent. Thank you for bringing this to our attention and the thorough description of what's going wrong.