
Hi everyone, I am currently working on a script for a specific method of dice rolling used in the system Anima: Beyond Fantasy. Since this is also my first script I intend to use, I would be greatly appreciative if someone more experienced with the API would look it over and point out any common mistakes I am making. note: I have borrowed code snippets from other scripts to get the basis of what I want to do. I remember borrowing the token checking section of the auto-light script posted on this forum, and Brian lent some code for speaking as character, but I probably grabbed a few other things. <a href="https://gist.github.com/aRotondi1990/6795346" rel="nofollow">https://gist.github.com/aRotondi1990/6795346</a> What the roll is supposed to be doing is that the player selects the token, then (hopefully) clicks a button on a chat macro they have set up beforehand. The script rolls some basic d100 dice and if the result is over 90, they are allowed to roll again, but the amount rolled on the new dice needs to be at least 91 before an additional roll can happen. This can repeat even further (92,93, etc) up until the ceiling of 100. Additionally, some other system math is involved in that unless a character specifies that they have a certain ability (Inhumanity / zen) their rolls are limited below a threshold. Since there are multiple ways to obtain this ability, I simply made it a parameter on the end of the roll (so different characters can specify per macro if they have the ability applied). Currently, I am unable to view even the most basic of the logs, and I receive the following error message: TypeError: Object [object Object] has no method 'indexOf' at Object.d20.textchat.doChatInput ( Needless to say this is less than helpful, and so I feel I am slightly stuck. Any help would be greatly appreciated. :)