Thank you again for the help. The quick /help should prove useful later on!
So now, adding on things from last night and all, I've gotten just about everything going, but for some reason, the bot does not successfully whisper through Twitch.
So if any $nick uses gamble, the script is fully executed, all is well, and variable "%gamble_CD.[$nick]" is created. If the same user attempts to use gamble before their cooldown has expired, the script recognizes %gamble_CD.$nick and attempts(?) to send out a message and does not execute the rest of the scirpt. The only problem, of course, is that nothing goes through on the Twitch end. The window within mIRC does, however, say this ("username" substituted for appropriate $nick):
-> *username* username, your gamble cooldown expires in 34mins 13secs
I assumed that seeing this message meant that I had improperly loaded json or mtwitch modules at some point, and so the msg command was not being properly "recognized" and "translated" into a whisper when it hit twitch. After unloading the scripts in question and then reloading what I needed in the proper order (json, core, and group chat in that order; I followed each page's installation instructions exactly) and allowing for initializations when prompted, I still got the same results from the script. The mIRC window displays that same message but nothing goes through on Twitch.
So, last question, I hope, and forgive me for my beginner mistakes that I'm sure I've made: How might I go about further diagnosing/fixing this problem? Thanks again for all your help.
Note: I realize that this is no longer about the gambling script that this forum is about, but I thought this problem was minor and didn't warrant a whole new forum creation - feel free to tell me I am wrong and I can make another post just about this issue.
Script in question:
on *:text:!gamble*:#: {
if (%floodgamble) { return }
set -u5 %floodgamble On
if ($($+(%,gamble_CD.,$nick),2)) msg $nick $nick $+ , your gamble cooldown expires in $duration(%gamble_CD. [ $+ [ $nick ] ])
elseif ($2 isnum 1-50) {
var %wager = $int($2)
if ($int($2) == $2) {
var %randgamble = $rand(1,100)
if (%randgamble <= 70) {
writeini -n Points.ini $+(#,.,$nick) Points $calc($readini(Points.ini,$+(#,.,$nick),Points) - %wager)
msg $chan $nick rolls a %randgamble and loses! $nick now has $readini(Points.ini,$+(#,.,$nick),Points) SN1PEbucks.
}
elseif (%randgamble >= 96) {
writeini -n Points.ini $+(#,.,$nick) Points $calc($readini(Points.ini,$+(#,.,$nick),Points) + (%wager * 3))
msg $chan $nick rolls a %randgamble and wins triple their bet! $nick now has $readini(Points.ini,$+(#,.,$nick),Points) SN1PEbucks!
}
else {
writeini -n Points.ini $+(#,.,$nick) Points $calc($readini(Points.ini,$+(#,.,$nick),Points) + (%wager * 2))
msg $chan $nick rolls a %randgamble and wins double their bet! $nick now has $readini(Points.ini,$+(#,.,$nick),Points) SN1PEbucks!
}
SET -ze %gamble_CD. $+ $nick 2400
}
else msg $chan Whole numbers only, $nick
}
elseif ($2 isnum) msg $chan You can only gamble in the range of 1 - 50 SN1PEbucks.
else msg $chan To gamble SN1PEbucks, use the form "!gamble <amount (1-50)>" with whole numbers only.
}