 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
bloodyknee
Joined: 22 Apr 2009 Posts: 18
|
Posted: Thu Apr 30, 2009 1:41 am Director Lingo, if anyone can help |
|
|
|
So I'm making a really basic sudoku game in director, not auto generated cells or anything, just a basic game where you have to input the right numbers and see if it is correct.
here is what it looks like:
Main area, 4 static text areas and 4 editable text areas (the ones with 0's).
The next screen at frame 6-10, just to let people know they won.
and here are the scripts:
Movie:
| Code: |
on startMovie
sprite(11).visible = FALSE
end |
Sprite 11 is a cross that should appear if you get the answer wrong when you click the button
Hold:
| Code: |
on exitFrame me
go to the frame
end |
Working fine as usual, placed at frame 5 and 10
Button:
| Code: |
global cell1
global cell4
global cell6
global cell7
on mouseUp me
cell1 = member(1).value
cell4 = member(4).value
cell6 = member(6).value
cell7 = member(7).value
if (cell1 = 4 and cell4 = 3 and cell6 = 2 and cell7 = 1) then
go to frame 6
else
sprite(11).visible = TRUE
end if
end |
This is what I can't get to work
even the sprite doesn't show up, as if it ignored the whole if statement
Please help if you can |
|
kanenas

Joined: 14 Dec 2004 Posts: 352
|
Posted: Fri May 01, 2009 12:26 pm Debugging |
|
|
|
| Have you tried using the debugger? |
|
bloodyknee
Joined: 22 Apr 2009 Posts: 18
|
Posted: Fri May 01, 2009 8:34 pm debugger |
|
|
|
I've never really use debugger until now.
I can't seem to get it to start, either because it's a on mouseup event, or because there is no error, because it is a logical error, not a syntax error.
any other ideas? |
|
kanenas

Joined: 14 Dec 2004 Posts: 352
|
Posted: Sat May 02, 2009 11:07 am Breakpoints |
|
|
|
| Make sure you put the breakpoint on a line within the event handler, not on the "on mouseUp" line. The fact that it's a mouseUp event has no affect on the debugger. If the debugger still isn't stopping at the breakpoint, the line isn't being reached because either the handler isn't registering for the event or the event isn't firing (the latter seems unlikely). |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
|
 |
|
|
|
|
|
|
|