Hey, I’m trying to ease things up for mods, trying to make a !score command that returns the streamer’s win/loss count so far, should return Ex: Today's Record 4 W - 2 L, what I want to do is make it so that !win adds 1 point to the wins and !loss adds 1 point to the losses.
What I tried so far (which I suppose is not how you do this) for the win count and didn’t work:
!commands add !win -ul=moderator -a=!commands edit !score $(eval var W = `$(win)`; var L = `$(lose)`; `Today's Record ${W+1} W - ${L} L`)
and this for the lose count:
!commands add !loss -ul=moderator -a=!commands edit !score $(eval var W = `$(win)`; var L = `$(lose)`; `Today's Record ${W} W - ${L+1} L`)
when I use those !score just returns: Today's Record [invalid variable]1 W - [invalid variable] L and Today's Record [invalid variable] W - [invalid variable]1 L
I added those, they “work” but there’s a problem when resetting, I use !rst for the qoute and !wrst/!lrst for the count resets, I do all 3 to zero out everything, but then when I use !win or !lose it continues counting from where it was, aka !wrst/!lrst probably did not reset the count:
I see what might be the issue.
In the post I linked I assume you add commands through the dashboard, especially since I mentioned to do so for the commands that contain a PRIVATE_TOKEN.
But if you are adding the reset commands through the chat, then you need to add a back slash before the counter reset: \-c=0, so that on the dashboard the command’s message looks like !commandYouReset -c=0
Thank you very much, works . Don’t worry I always do these stuff while offline, when nobody’s in chat and I clear the chat afterwards, not the most secure way, but I prefer adding commands through chat.