Hello everyone i am trying to get my mud to compile and don't have tons of exp coding but i have done some online correspondace classes and read mounds of books but i am still lacking the knowledge of getting this all down due to the fact there are no books about making a mud lol well i am looking for someone to help me get this darn thing compiled when i make this is what it spits out not exactly sure what is what so please be as decriptive as possable
make: Entering directory `/cygdrive/c/nmud/holdall/swrots/src' gcc -c -g3 -Wall save.c save.c: In function `load_corpses': save.c:2343: warning: assignment from incompatible pointer type save.c:2345: error: dereferencing pointer to incomplete type save.c:2347: error: dereferencing pointer to incomplete type make: *** [save.o] Error 1 make: Leaving directory `/cygdrive/c/nmud/holdall/swrots/src' make: *** [all] Error 2
Are you trying to get the mud to compile for the first time, or are you trying to compile because you have just made some changes?
The compiler is pointing you to lines 2343 and surrounding in save.c. Post those lines of code so others can help point out the issues. Make sure to indicate the line numbers. You might also try some google searches for the error messages the compiler is giving you – you're going to have to understand what the compiler is telling you in order to be a self-sufficient programmer. :unclesam:
You can learn C by learning mud code first, but if you do, expect to break things. Expect to break everything. You will have to ask a lot of questions that experienced coders will scoff at. Don't be afraid to jump in head first, but do get a book. You don't have to read it at all, just skimming it will be very helpful, even if only so you know why %s doesn't work with certain types of variables (and what actually does work instead).
Disclaimer: If you do try to learn C through mudwork, you will become intimately familiar with your copy and paste keyboard shortcuts. In fact, people who come to your house will probably wonder why your C and V keys are not marked. They will also ask why everything near your computer desk is broken beyond repair (hint: you will get angry).
You might do best to at least learn just the basics of C. Pointers are a very important part of the language. I too Come from a VB background, so that was a hard part for me To get down. As far as books, the one i found most helpful is Is Sams 21 day learning. It goes over the basics and moves On to the more meaty stuff.
I would have to agree that books can only take you so far. But I tried to learn my base without understanding the basics And now that I have done that, its so much easier.
You will want this book: C Programming Language. It is NOT a good book for learning C from scratch, but you shouldn't be trying to code real C applications without having read it.
For a good introductory book, I hear a lot of good things about this one: Beginning C. I have not read it myself and hence cannot give it a hearty recommendation.
If you want to get into C++ after you are done with C (I recommend learning and switching to C++ as soon as possible, but do NOT do that until you have already become competent C, or you will end up retarded), this is apparently the text the pros all learned from: C++ Primer.