✅ variable wont change
then when I go run the program again it says the money is "100$" as I had it at the start and it wasent changing???
26 Replies
can u show the declaration of
vars.money
?
i didnt create instanse
well maybe vars.betAmount is 0
but when i lose it goes down
Also, you're saying "run the program again". Meaning, you close it and re-run it?
Or you got some loop that re-runs it?
while loop
well
do while loop
thingy
can you share the full program?
the file or
$paste
If your code is too long, you can post to https://paste.mod.gg/, save, and copy the link into chat for others to see your shared code!
how do i save it
on that website
wait
nvm
BlazeBin - wzqqmlktbsch
A tool for sharing your source code with the world!
i have static public main on a different file so dw abt that
where is vars.money in ur code
its chips
did you make sure the if condition of that code returned true?
you can debug, set breakpoints, or even put Console.WriteLine to make sure it was executed
i didnt put it as a bool cuz there was a third option when u win but i didnt need to program that bit so i js didnt change it
ill try that
ty
well u already did with
Console.WriteLine("your number is lower! you lose");
did it print that?it printed it yeah
and it is a 0
what is, vars.betting?
bet amount
Your best bet would be to just use the debugger, step through the code, and see when it changes to the incorrect value
alr
$debug
Tutorial: Debug C# code and inspect data - Visual Studio (Windows)
Learn features of the Visual Studio debugger and how to start the debugger, step through code, and inspect data in a C# application.
alr tysm yall