January 23rd, 2026 at 1:35:34 PM
permalink
Greetings,
For those familiar with WinCraps & the scripting language, I am troubleshooting a script I've built. It passes the internal structure check & all of the logic works except for where I have given a checkstack a string value & assigned this checkstack a name. The name gets placed properly but the value remains at 0.
Script lines:
cs9.HandPhase = "None" :
csn9 = "Hand Phase" :
It successfully reads both of these and places "HandPhase" in the variable name field properly, but it is assigned a value of "0". If I change cs9.HandPhase = "Test" :,
reininitialize & run the script again, the value for cs9.HandPhase still remains at "0". If I change
cs9.HandPhase = 311 :,
reininitialize and rerun the script, the value for cs9.HandPhase is now "311". It seems to only like it when I assign numerical values to the CheckStack variable!?!
At later points in the script I try to change the value of cs9 to a different string (such as cs9.HandPhase = "P1" :) and it successfully reads the line of script but the value of cs9 doesn't change.
Any ideas or help is greatly appreciated!
Thank you!
AkaJackson
For those familiar with WinCraps & the scripting language, I am troubleshooting a script I've built. It passes the internal structure check & all of the logic works except for where I have given a checkstack a string value & assigned this checkstack a name. The name gets placed properly but the value remains at 0.
Script lines:
cs9.HandPhase = "None" :
csn9 = "Hand Phase" :
It successfully reads both of these and places "HandPhase" in the variable name field properly, but it is assigned a value of "0". If I change cs9.HandPhase = "Test" :,
reininitialize & run the script again, the value for cs9.HandPhase still remains at "0". If I change
cs9.HandPhase = 311 :,
reininitialize and rerun the script, the value for cs9.HandPhase is now "311". It seems to only like it when I assign numerical values to the CheckStack variable!?!
At later points in the script I try to change the value of cs9 to a different string (such as cs9.HandPhase = "P1" :) and it successfully reads the line of script but the value of cs9 doesn't change.
Any ideas or help is greatly appreciated!
Thank you!
AkaJackson
February 6th, 2026 at 4:27:21 PM
permalink
It sounds like checkstack variables in WinCraps are numeric only for stored values, even though the name field accepts strings. In other words, the label can be text, but the underlying value is treated as a number, which would explain why strings always resolve to 0.
February 13th, 2026 at 5:40:23 AM
permalink
It took me a minute to digest what you are saying, but now I get it. So now instead of trying to assign a permanent label name to a CS# variable and then giving this CS# a string value when it only wants numbers, I can just use the CS label name part as the "string accepting" variable itself. It took me a while to wrap my head around this, but I see how this works now!
Thank you for taking the time to explain this to me.! The Help file said a few times that WinCraps can work with strings as variables but I must have not read that thoroughly enough to understand that this only applies to the Label portion of the CS variable.
Kudos to you and thanks again!
Have a great day,
Corey
Thank you for taking the time to explain this to me.! The Help file said a few times that WinCraps can work with strings as variables but I must have not read that thoroughly enough to understand that this only applies to the Label portion of the CS variable.
Kudos to you and thanks again!
Have a great day,
Corey

