
I want to use a script that sends the items that are equipped and that has attack to chat with hyperlinks to toggle the equipped and has an attack checkbox.
The toggles work fine, and if the items is already in the Attack and Spellcasting section and that I toggle has an attack off, it properly removes the item from the section.
But, when I toggle it back, the checkboxes check themselves, but the item doesn't automatically go back to the Attack and Spellcasting section.
FROM CONSOLE -->
*****************************************************************************************************************************************************************
"ReferenceError: update_attacks is not defined\n at Array.eval (eval at messageHandler (evalmachine.<anonymous>:284:6), <anonymous>:240:13)\n at self.trigger (evalmachine.<anonymous>:79:37)\n at messageHandler (evalmachine.<anonymous>:287:11)\n at process.<anonymous> (/home/node/d20-api-server/node_modules/tiny-worker/lib/worker.js:65:55)\n at emitTwo (events.js:106:13)\n at process.emit (events.js:194:7)\n at process.nextTick (internal/child_process.js:766:12)\n at _combinedTickCallback (internal/process/next_tick.js:73:7)\n at process._tickCallback (internal/process/next_tick.js:104:9)"
*****************************************************************************************************************************************************************
Any help would be greatly appreciated.
*** I use this for player to swap their weapons and be able to attack with them. If it is not equipped, can't attack with it. Now, if you have 2 hands, you will have to use a bonus action to swap weapons, and if the weapon needs your hands to be used, there shouldn't be more than two weapons in that section.