I'm relatively new to StackOverflow, so I apologize for any mistakes I might make. I'm making a Fallout-type skill system in a Batch script, and the idea is that you have a certain amount of skill points to assign, and if that number reaches 0 then you can no longer assign skill points. This is the part that isn't working for me:
if "%sdec%"=="5" (
if "skp"=="0" goto skperrors
set /a "skp=skp-5"
set /a "s=s+5"
)
sdec is the number that the person inputs for how many skill points they would like to assign. The "if skp=0" segment is only assigned for positive integers, as 0 would skip that skill and any negatives would subtract thus giving them more skill points to spend. In my head, it checks to see what number they input, and then checks to see if they have 0 skill points. If they do, then it redirects them to an error message. If not, it just goes past it. But when I run the code, it seems to skip right over it. Much love for anyone who can help <3