Adjusted Sub Goal

So I’ve been trying to teach myself how to use the code and create a goal command for followers and subscribers, and I got it working, but it always counts me as a subscriber and I’d like to subtract the total number of subs that it counts by 1 so that the subcount is more accurate. Currently, my !subgoal code looks like this:

$(channel) is $(urlfetch http://twitch.center/customapi/math?expr=25-$(twitch $(channel) "{{subscriberCount}}")) Subs away from reaching the goal!

How and where would I add the -1 to subs?

Something like this could work fine.

!commands add !goal $(channel) is $(eval 25 - $(twitch $(channel) "{{subscriberCount}}") - 1) subs away from reaching the goal!

Ooooh, of course the -1 is the the right of the whole thing I kept trying to put it immeditaly after the ending quotation mark lol. Thank you so much you completed my code and taught me a useful lesson!

1 Like

No problem with $(eval) advanced APIs for simple math are no longer needed. Sometimes it’s easy to get lost in commands.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.