Thank you so much - this is a lot more help than I expected posing those last questions!

To clarify the misstated issue about the multiple "execution" strips performing... Before I added "halt" to the end of the two "If" "relation" statements, the script would execute the appropriate "If" "relation" statement (so it would recognize and properly evaluate the number) but would then also execute the "Else" statement at the end of that bit. My apologies if I'm still being a bit vague, but I hoped to clear that up.

The problem you mentioned with the "decimal numbers" exploit is actually an important one to address, so I appreciate you recommending and adding the $floor statement. I can't put this in my script to test tonight, but the one question I have about this is: does the $floor statement truncate the decimals off of $2, or round $2 up or down "appropriately?" I assume it does the former since there is also a $round option you mentioned. In the case it does just remove all decimals off of $2 without regards to rounding, $floor is what I would want.

But then I wonder - is there a way to write an if statement that would check if $2 was a whole number, and if false, send a msg to $chan and then halt the script? That way there's no issues with 50.99999 still being gambled as 50 during the $2-to-%wager $floor conversion and hearing troll complaints about it.

My idea: can I ask to check if $2 - %wager = 0 as a solution, since $floor is used on $2 (to eliminate all decimals, I assume) to create a whole number named %wager? Or would this calculation round the difference to exactly 0 if close enough, thus not serving a purpose? I.e., would this work?

Code:
 if (($2 - %wager) == 0) {
msg $chan blah blah no decimals blah
halt } 


Again, thanks for looking into this, everyone. And thanks for the help, Blas.

Edit:

Also, I do use SReject's json script, so I believe all I need to do is insert the Core and Group Chat modules. Then all should be well. I will confirm this script is working whenever I can access my desktop tomorrow.

Last edited by codmister11; 15/01/16 02:49 AM.