Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ SMAUG coding ➜ Problems with code i created

Problems with code i created

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1  2 

Posted by Jason   (109 posts)  Bio
Date Reply #15 on Sat 06 Mar 2004 10:17 AM (UTC)
Message
ok i have picked a book up before i can't learn from a book... I learn from trial and error can you please help me and show me what is wrong?
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #16 on Sat 06 Mar 2004 10:22 AM (UTC)
Message
Suit yourself, but consider yourself to have been warned. :)

We already told you what the problem is. The first case labels is correct, but the ones after that are inside the wrong pair of brackets. They should be nested at the "top level" of the switch, that is, the part after
switch(xyz){
case ...:
   break;
case ...:
   break;
default:
   break;
}


Go read this for an explanation of conditional expressions in C.
http://www.physics.drexel.edu/courses/Comp_Phys/General/C_basics/c_tutorial.html#conditionals

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Jason   (109 posts)  Bio
Date Reply #17 on Sat 06 Mar 2004 10:32 AM (UTC)
Message
ok i'm trying to figure out how it is inside the wrong set of brackets.... I've look at many examples just like it... they work and they are setup the same
Top

Posted by Jason   (109 posts)  Bio
Date Reply #18 on Sat 06 Mar 2004 10:47 AM (UTC)
Message
I got to looking at the code again
I see the problem
Thanx for being so rough i can't beleive i didn't see it
THanx THANX THANX
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


59,536 views.

This is page 2, subject is 2 pages long:  [Previous page]  1  2 

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.