Ok got another bug that doesn't make any sense to me...
Ok got another bug that doesn't make any sense to me...
seriously idk wtf is with this one, im part way through working on the tic tac toe in lesson 12, and i draw the grid, set the square states, basically im up to the point where im about to start making the cursor move aaaaand i test it out and there are 2 Xes on the screen in position 0,1, and 2,1.. so im like wtf, i look for the problem cant figure it out. i run it again ( keep in mind i have done NOTHING to the code, now there are Xes, at 1,1 and 3,0. so i look around, again touch nothing, run it again and its like it was before. i could understand if i messed up an there was a glitch, but im not changing the code how in the hell is the position of the Xes changing???
- Attachments
-
- Chili DirectX Framework.rar
- i had to delete the ipch in order to fit in in there, but that shouldn't make a difference
- (5.79 MiB) Downloaded 146 times
Re: Ok got another bug that doesn't make any sense to me...
ok, do i figures out the problem is with the beginning statement where im designating all the square states to empty. that would explain why the xes are changing position without me changing the code, its just garbage in the ram thats causing that. but i don't know what is wrong with the statement.
for (int index = 0; index < 9; index++)
{
SetSquareState(index, empty);
}
should that not designate all the set square states to empty? am i missing something here?
for (int index = 0; index < 9; index++)
{
SetSquareState(index, empty);
}
should that not designate all the set square states to empty? am i missing something here?
Re: Ok got another bug that doesn't make any sense to me...
Have a look in the SetSquareState function, read what each case in the switch statement does, i'm sure you'l see it
Musi
There are 10 types of people that understand binary.
Those that do, and those that don't.
There are 10 types of people that understand binary.
Those that do, and those that don't.
Re: Ok got another bug that doesn't make any sense to me...
bahahaha omg im such a tool. i copied and pasted an changed all the cases, but not the actually states. im slowly getting better at this trouble shooting lol but ive only been at it a week an a half so it will probably take some time, i have no doubt i will be back here soon thanks so much foryour help