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 .
×

noarchive:true doesn't work

1772476380

Edited 1772476394
Quinn
Pro
Sheet Author
Code: on('chat:message', function(msg) { if(msg.type == 'api' &amp;&amp; msg.content.indexOf('!debug') == 0 &amp;&amp; playerIsGM(msg.playerid)) { sendChat('Debug', 'Test', {noarchive: true}); } }); Chat: "Test" "!debug" Expected: Message from narrator appears in text chat but not in chat archive Actual: Message appears in both text chat and chat archive Here's a game where I've set the bug up in the simplest context possible: <a href="https://app.roll20.net/join/21167268/QtRUyQ" rel="nofollow">https://app.roll20.net/join/21167268/QtRUyQ</a> &nbsp; No special conditions required. noarchive is simply not being respected.
1772478872
Gold
Forum Champion
Have you sent this in to Roll20 Help Center yet?&nbsp; That is my advice to hope to get attention and a reply for it&nbsp;
1772479909

Edited 1772479921
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi Quinn! I think you are missing an argument. You must include a null (or actual function) as the third argument so the options object becomes the fourth parameter. Try: on('chat:message', function(msg) { &nbsp; &nbsp; if(msg.type == 'api' &amp;&amp; msg.content.indexOf('!debug') == 0 &amp;&amp; playerIsGM(msg.playerid)) { &nbsp; &nbsp; &nbsp; &nbsp; sendChat('Debug', 'Test', null, {noarchive: true}); &nbsp; &nbsp; } });
1772482131
Quinn
Pro
Sheet Author
Updated script, issue persists.
1772499560

Edited 1772499643
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hmm. I use noarchive in almost all of my scripts without issue. I just checked my own campaign chat archive and found nothing that shouldn't be there. I entered the script as I posted above and ran the command: !debug bob !debug bob Here are my chat results ("Test" shows), and my Chatlog ("Test" is missing and shows only the bobs).
1772499733
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
If you are testing in rapid succession, sometimes you can run into a situation where you briefly have two sandboxes overlapping. I'd suggest checking the script, making sure it is saved, exiting the game and restarting it, just to use the nuclear option.
1772500069
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
BTW, your join link is probably safe, if it's a throwaway game, but we usually warn folks away from publicly posting join links. It can lead to vandalism or harassment.
1772506713

Edited 1772506760
Could this possibly be specific to the Default/Experimental API sandbox setting?&nbsp;
1772508696
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I ran it under both, to be sure.
For what it's worth, I was able to reproduce the issue. Then I cleared the chat log and could no longer do so.
1772549957
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Interesting. That might be able to explain the discrepancy. Quinn, does that step work for you? It might be worth clearing cache and cookies as well.
1772550026
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Jim R. said: For what it's worth, I was able to reproduce the issue. Then I cleared the chat log and could no longer do so. I missed the terminology. log or archive? I assume the latter.
1772550568
Quinn
Pro
Sheet Author
Huh... interesting. How it's going for me: Say A, !debug, Say B All three appear in text chat Check chat archive, all three appear there Refresh game Debug message gone from text chat Refresh chat archive, debug message gone from there It seems like the actual behavior is that the noarchive messages persist on both screens until you refresh the tab, then they vanish from both.
1772550745
Quinn
Pro
Sheet Author
keithcurtis said: BTW, your join link is probably safe, if it's a throwaway game, but we usually warn folks away from publicly posting join links. It can lead to vandalism or harassment. Oh yeah, I only posted the link because the game has no actual game content. I'd never do that for an actual campaign.
1772568570
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Quinn said: Huh... interesting. How it's going for me: Say A, !debug, Say B All three appear in text chat Check chat archive, all three appear there Refresh game Debug message gone from text chat Refresh chat archive, debug message gone from there It seems like the actual behavior is that the noarchive messages persist on both screens until you refresh the tab, then they vanish from both. That is unusual behavior. Did you try Jim' suggestion of actually clearing the chat archive? They are known to become corrupted, though this is much less common than it used to be. Also, is the chat archive window open while you are actually running the script? I opened the window after the fact. I'll test for concurrent behavior.
1772568881
Quinn
Pro
Sheet Author
Cleared chat archive, and it's working now. Very strange, but at least I can brute force it if necessary.
1772568960
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Nope, the chat archive doesn't even update for me if it is open. It only populates on a refresh of the archive page and never shows the noarchive entries. I'll try joining your game.
1772568990
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Joined. GM me when you get the chance.
1772633054

Edited 1772633088
Quinn
Pro
Sheet Author
Promoted, but I'm not sure what you're saying. AFAIK the chat archive has never had the ability to update without refreshing the tab. As far as I can tell, ultimately, noarchive does seem to work, just sometimes on a short delay, so my problem is more or less solved at this point.
1772639732
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Ah, if that's the case then, I'll just boot myself from the game.