00:00
00:00
Newgrounds Background Image Theme

Coheed23 just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

C# code problem

880 Views | 2 Replies
New Topic Respond to this Topic

C# code problem 2016-01-27 13:42:38


so i'm trying to make a goddamn slot machine (label 1-label 2-label 3 are the slots) but the "if" block wont work, it wont change the "puan" (point) even if the numbers are equal. do i got to use int. variables instead of string?

C# code problem

Response to C# code problem 2016-01-27 21:12:46


At 1/27/16 01:42 PM, Arsivnet wrote: do i got to use int. variables instead of string?

I'm not very familiar with C#, but you shouldn't need to; you're comparing two objects that are the same type, so if they contain the same data they should compare without issue.

Are you 100% certain that either of the two if-statements are evaluating to true? Have you used a debugger to confirm that?

Response to C# code problem 2016-01-28 05:25:51


At 1/27/16 09:12 PM, Diki wrote:
At 1/27/16 01:42 PM, Arsivnet wrote: do i got to use int. variables instead of string?
I'm not very familiar with C#, but you shouldn't need to; you're comparing two objects that are the same type, so if they contain the same data they should compare without issue.

Are you 100% certain that either of the two if-statements are evaluating to true? Have you used a debugger to confirm that?

well, i solved the problem which was just a basic logic type problem, i forgot to have him update the label which stated the point of the user, so the point DID change but it just wasnt updating the label. so here is the working codes and the ones i added in case somebody else comes in this ghost forum, looking for solutions.

C# code problem