![]() |
|
if somebody press Esc he go to another function |
Kauhiz
Member #4,798
July 2004
|
Oh, so you asked a question and didn't bother to post the ACTUAL CODE YOU WERE HAVING PROBLEMS WITH! Great! That's just... great! Why the hell do you even have a function after meni(), if you want to quit straight after meni() anyway? --- |
a b
Member #8,092
December 2006
|
I have 462 lines of code now, I can't show everything because I have it in POLISH (names and comments are polish), but I now shorten my program and change in this program names and comments to english - for example:
|
tobing
Member #5,213
November 2004
![]() |
Post the complete code. No matter what language. People that are willing to help would look into that code, regardless of the language. Try to help those people that are willing to help you! Write comments in english if you can, and use english names for functions and variables, if you can. |
Kauhiz
Member #4,798
July 2004
|
What you want to do is use states for your game, just like LennyLen told you to do in post #10 of this topic (he even posted code!). --- |
LennyLen
Member #5,313
December 2004
![]() |
Quote: What you want to do is use states for your game, just like LennyLen told you to do in post #10 of this topic (he even posted code!). I didn't test the code, I just wrote it straight into the reply box, so there's one problem with it. At the moment, it uses if (key[KEY_ENTER])), when it should use readkey() >> 8.
|
Richard Phipps
Member #1,632
November 2001
![]() |
ARRRRRRRRRGGGGGGGGGGGGHHHHHHHHHHH!!!!!! |
LennyLen
Member #5,313
December 2004
![]() |
Don't worry Richard, it'll all be okay. After all... a b said: I know c++ very well
|
X-G
Member #856
December 2000
![]() |
You all realize I'm going to be smug about this all week, right? -- |
LennyLen
Member #5,313
December 2004
![]() |
Quote: You all realize I'm going to be smug about this all week, right?
And how does that differ from any other week?
|
Kauhiz
Member #4,798
July 2004
|
LennyLen said:
Don't worry Richard, it'll all be okay. After all... </quote>Where'd he say that? Are you sure he didn't just forget the [sarcasm] tags or something? --- |
Evert
Member #794
November 2000
![]() |
a b
Member #8,092
December 2006
|
Now I have 1016 lines of code and I can't insert my code here because: I have 1016 lines of code - and it is my code (I have this code in 5 files so I insert here everything) - please tell me what should I do if I want that during the game when I press ESC game exit. So could you help me ? DELETE |
hexagon
Member #8,207
January 2007
![]() |
Now, that's what I call some ugly code. When posting alot of files like that, you should atleast put a; EDIT: Quote: [..]I can't show everything because I have it in POLISH (names and comments are polish)[..] The only comments I can find in that code are; int tab1[2][10]={ {272,489,664,882,762,912,682,471,437,211}, // <- "x" {120,175,102,114,262,360,354,421,311,354}, // <- "y" }; and that, IIRC, is not Polish. |
tobing
Member #5,213
November 2004
![]() |
You better make a zip-File or rar-File with your (complete) code in it and attach that to a posting here. |
Kauhiz
Member #4,798
July 2004
|
No. That does it, I quit. I'm not going to go through 400+ lines of code because you can't bother to think about the advice you are given. You have been given dozens of good answers. But basically, what you do is you copy & paste the code you're given and do zero implementation. And then you expect it to work? Boy, I wonder why your problem hasn't been solved Don't expect anyone to write your code for you. There's hardly a difference between posting your entire source and asking someone to write it from scratch, except that I'd actually prefer writing it from scratch to going through that mess of uncommented code. Why the hell does every variable name have to have like 3 Zs in it? Damn, Polish sucks --- |
a b
Member #8,092
December 2006
|
Kaukiz Wrrrrrrr #include <iostream> #include <ctime> #include <allegro.h> #include "klasy_deklaracje.h" #include "funkcje_deklaracje.h" using namespace std; .............. and after that you have: .................. #include "klasy_deklaracje.h" #include <iostream> #include "funkcje_deklaracje.h" using namespace std;
etc. - because it is code from 5 files - I could this more nicely cut and paste here (in 5 detached code) but I thought that you understood......... eh........ Programme certainly run !!! Kaukiz what this is for you 1000 the line of code |
Richard Phipps
Member #1,632
November 2001
![]() |
Neee Neee Neee!! |
Evert
Member #794
November 2000
![]() |
a b, has anyone ever told you to read http://alleg.sourceforge.net/stabledocs/en/help.html ? It's specifically for when you have a problem with Allegro, but much of the advice given is generally valid, and you routinely breach a lot of it. I very strongly suggest that you read it and try to ask questions based on that. |
a b
Member #8,092
December 2006
|
Evert but in my game haven't mistakes - I only want to know is it better way that if somebody press ESC game will exit - I will be very grateful if you say me mayby on this exmaple - because it is more readable for you - is it better way then in below function: kaukiz() and something() ??
|
tobing
Member #5,213
November 2004
![]() |
This guy is really hopeless. I give up. |
Kauhiz
Member #4,798
July 2004
|
Quote: I alone write this code and blah blah blah... I think you missunderstood what I said. What I meant was that people post example code of how to do what you want. And you just throw that into your source, and it doesn't work since it's just an example, and you have to implement it properly. Quote: In fact anybody does not answer what should I change in the code if I want that after press ESC game will exit. In fact I did. In fact every question you have asked so far has been answered and example code has been supplied. It just seems to me that you think that if you ask the same question again and again, eventually someone's going to write the whole thing for you. Either that or we're getting Punk'd. Edit: Oh, BTW, kudos on constantly and consistently misspelling my name. --- |
X-G
Member #856
December 2000
![]() |
-- |
a b
Member #8,092
December 2006
|
Eh......... I don't want that you write it for me !!!! I now deleting code of my game - and now staying only my examples so you can't write code for me. In function kaukiz() and something() I must check if somebody don't press ESC - could this write better ? |
Kauhiz
Member #4,798
July 2004
|
I said: In fact every question you have asked so far has been answered and example code has been supplied.
--- |
hexagon
Member #8,207
January 2007
![]() |
Quote: could this write better ? Yes, you could write it a lot better. (If that is what you mean) Honestly, I would suggest you to buy a book regarding C/C++ and read it (and understand it), |
|
|