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

Problems with editing script, any help appreciated

Having issues editing the script "Drunk" just to make a simple chat output change. Changed the original script from: setDefaults = (reset) => {         const defaults = {             config: {                 command: 'drunk',                 advanced: false,                 inebriation_level_attribute_name: 'inebration_level',                 inbebration_dc: 10,                 inbebration_levels: {                     1: [                         '<b>Disadvantage</b> on <i>Persuasion</i> and <i>Deception</i>.',                         '<b>Advantage</b> against <i>Frightened</i>.',                         'To cast a spell, make a DC 10 Constitution saving throw or the spell fails. The spell is not wasted.',                     ], too:   setDefaults = (reset) => {         const defaults = {             config: {                 command: 'drunk',                 advanced: false,                 inebriation_level_attribute_name: 'inebration_level',                 inbebration_dc: 10,                 inbebration_levels: {                     1: [                         '<b>Disadvantage</b> on <i>Persuasion</i> and <i>Deception</i>.',                         '<b>Advantage</b> against <i>Frightened</i>.',                         'To cast a spell, make a DC 10 Constitution saving throw or the spell fails. The spell is not wasted.',          'You start the night with a cold one with the boys.'                     ],                     The output is only showing the first/original output and not the, "  'You start the night with a cold one with the boys.'". I have 0 programming experience so any help is greatly appreciated. (sorry if this is a stupid question)
1592198293
The Aaron
Roll20 Production Team
API Scripter
Can you link the original a script?
<a href="https://github.com/Roll20/roll20-api-scripts/tree/master/Drunk" rel="nofollow">https://github.com/Roll20/roll20-api-scripts/tree/master/Drunk</a>
1592229681
The Aaron
Roll20 Production Team
API Scripter
It's probably easiest to just put them together: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1: [ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '&lt;b&gt;Disadvantage&lt;/b&gt; on &lt;i&gt;Persuasion&lt;/i&gt; and &lt;i&gt;Deception&lt;/i&gt;.', &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '&lt;b&gt;Advantage&lt;/b&gt; against &lt;i&gt;Frightened&lt;/i&gt;.', &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'To cast a spell, make a DC 10 Constitution saving throw or the spell fails. The spell is not wasted. You start the night with a cold one with the boys.' &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ],
1592229917
The Aaron
Roll20 Production Team
API Scripter
Though, looking at the code, what you did should have worked.
Yeah, I tried putting them together as well and it did not change in game. Maybe the script draws its values from a different part? The chat output is only listed once in the code and its what I edited so I'm not sure why it didn't change.&nbsp;
1592251331
The Aaron
Roll20 Production Team
API Scripter
Do you have two copies of the code?&nbsp; Perhaps you have the 1-click installed and you copied the source to a new tab without disabling the 1-click version?
I did have the 1 click version before I set up the code manually so I could edit it. I thought I disabled it and it does not show in the tabs in the API menu. Only the modified 'Drunk' has a tab where I set it up using new script. I just tried editing a preset sentence with characters and it did not change any chat log in game from the non-edited version.
I just got it working! Thank you for the help The Aaron, greatly appreciated. Just ended up tinkering around with the code and fixed a few discrepancies, reloaded and it worked.
1592258959
The Aaron
Roll20 Production Team
API Scripter
Woot!&nbsp; Congrats!