The online racing simulator
earning cash
(95 posts, started )
Didn't answer my questions either...

I don't see how we can help if he doesn't answer questions...
#77 - sun
yes i do understand woz. and i know how it works. thats your questiones answered woz.
#78 - Woz
Quote from sun :yes i do understand woz. and i know how it works. thats your questiones answered woz.

So you understand what a method is and you understand my code snippet.

How come you are still unable to locate your error in your code?

A method name expected error is normally simple to spot. BTW, it is IMPOSSIBLE for ANYONE here to say what the error is when all you post is (x == 145)

x could be anything and the it is not even a complete statement to be able to even understand the context.
I know exactly what the error is
If anybody wants proof I'll PM it to them, but I'm not telling Sun:


A. He won't answer any questions, so I give up...

B. It's now up to him to figure it out...
#80 - sun
i do answer questions, but i do go to school and cum home home at 3:30. So give me a chance to post because am busy when i come home... end this topic and when i've read the book i'll come back and post. BUT you have to promise somthing. IF I read the book and i understand it, you have to help me if i post for help on the X Y co-ordinates for the lottery tickets only. OK ? Agree ?.
I agree because if you read all the book and understand it all you wont have any need to come back!
Not strictly true... He may need help with actual LFS-related stuff (or complex programming tasks), but not simple programming problems.
Yes agreed but i mean in general he wont need to come back
#84 - sun
I agree
If you do read the book, I guarantee that you will know exactly what the problems are with that X statement. And most of your other errors and problems!
sun, that was pseudo code. I also explained that you needed to use the variables that represent the X and Y coordinates from the MCI packets.
#87 - sun
i have karl. oh finnaly put ur pc back together again ? lol
Quote from sun :i have karl. oh finnaly put ur pc back together again ? lol

It's fine. I've been working long hours and I don't have the energy/patience to "chat" to anyone at the moment without blowing up.

Kindly forgive me if I've not been at everyone's beck and call.
#89 - sun
i do . Oh yer i'am making my serlf a nice little application and i'am stuck on this bit. Not the programming !!!. if i went to click the button, and i want it to check idf its the right answer, would it be a 'CheckedList Box' in C# or something else ?

Regards

Owen.

-------------------------

-=STG=- Programmer.

-------------------------
#90 - Woz
Quote from sun :i do . Oh yer i'am making my serlf a nice little application and i'am stuck on this bit. Not the programming !!!. if i went to click the button, and i want it to check idf its the right answer, would it be a 'CheckedList Box' in C# or something else ?

Regards

Owen.

-------------------------

-=STG=- Programmer.

-------------------------

I think you have controls and functionality confused.

All controls like checkbox, button just handle display and user interaction. Such as each time when you click a checkbox it toggles the state.

The controls have no idea what the right answer is and they should not. You should have one or more classes that manage the logic in your application.

Keep display and logic separate. It will save you lots of work later on and stop you writing spagetti code.

Your object are what decides what is and is not the right answer! You should be able to change the form the user interacts with to something else and NOT have to change a single line of your logic code if you are doing it right.
#91 - sun
ok. but what should i do to add all the sums up and put a tick next to the sum if its right and put a cross if its wrong ? am trying to figure it out to :P it doesnt tell you in my book either >.<. regards owen
What is the right answer? I'm going to assume that what you're making is something like a quiz. If so:

You have two main options. Either radio buttons (the ones with a circle beside them) or normal buttons. Personally I would use radio buttons, but for a beginner normal buttons are probably easier.



Buttons: Say there are four possible "answers" to your question (You can't have an answer without a question!). For each one, make a button. You can do this in Visual C#'s GUI form creation.

Name each button aptly. The naming is up to you, but I would call them code names such as "Button1", "Button2", etc. as I find it easier to catalogue them later.

Next double click on a "wrong" button. You will be taken to a code editor which is using the "Button1"_Click method (If you called it "Button1" that is...). In here you put what happens if the user clicks Button1. Repeat this for each button.

That's probably the easiest way of doing it. However, it looks rather messy on screen. You can change the shape, size and colour of the buttons to make them look more attractive, or use radio buttons.



Radio Buttons: Make 4 radio buttons in the Visual C# GUI, and name them appropriately. Now you will have to make a button down the bottom of the form, which the user clicks to submit their answer. Name this button.

Double-click on this button. Again you will be taken to a block of code which is executed when the user clicks the button. In here you will need to put code such as:

if ("RadioName".Selected == true)
{
// Put Code to be executed if RadioButton1 is executed here
}

At least I think it's .Selected...You'll see it anyway



That's a basic example of what you would need to do...Then again I could have been completely wrong in my Quiz assumptions...
#93 - sun
wow ! thx dougie i know egzately what i have to do now
#94 - Woz
One thing about coding to learn is code organisation. No idea what you book is like on OO techniques and how to break apart a problem but here is an example based around you quiz with some possible objects that would be required.

1) Question object. This will hold the question id and question text along with an array/collection of possible answer texts. It will also need something to tell it which is the right answer, an index into the answer array or something similar.

2) Question list. This would hold your list of questions in your quiz and would serve up the questions in a pre-determined or random order.

3) User answer object. Would hold the question id and answer given by the user to the question.

4) Answers list. Hold a list of the answers given by the user.

5) Marking object. This would take the question list and answer list and mark each answer as correct or incorrect and give the overall score..

You form now would have all the structures it would require to run and score a test. All the form should care about is display of the next question and filling in the results in the answer list. It would then pass responsibility to the marking object to score everything.

There are other ways to break and different design patterns that can be used but this should help get your thinking on the right track.

I would say focus on this sort of stuff before the form. It will also force you to run code in a debugger which will let you see and poke the code to see how it responds, something that will teach you a lot.

#95 - sun
yer ok thx My uncle use to program but he can help me if i get stuck but i havnt cum accross any errors yet

earning cash
(95 posts, started )
FGED GREDG RDFGDR GSFDG