I am new to Roll20 and the API. I have some familiarity with
javascript and html, and quite a bit of experience with other coding languages. But I am struggling to send a parameter to the API. What I want to do is pass the current characters ability
Strength to the API so that I can perform calculations, make a random roll and
then return the result via the sendChat() function. I would like to call it using
something like !strengthContest @{selected|Strength} The function I have written does work if I call it using
!strengthContest and have a fixed value
for strength set in the API code. I am currently using if('api'===msg.type && /^!strengthContest(\b\s|$)/i.test(msg.content)){ myFunc(msg.who); } Where myFunc does all the processing and returns the result. Can anyone point me to the right place to see howto break
down the command line to get the value. or how to call the value from the API. I did see this one in a post, but after an hour searching I cant
find it again. I have found several posts which call the ability value by using the character name, but again i can't work out how to use this, as it could be different characters calling on the function, and All i have seen was using specific character info. Before anyone states I haven't posted all the code. I am not looking for anyone to fix the problem for me I just want to be pointed in the right direction as to where i should be looking/ what i should do.
Many thanks