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
➜ Parse error
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Nick Cash
USA (626 posts) Bio
|
Date
| Sat 03 May 2003 12:02 AM (UTC) |
Message
| I'm getting this error:
gcc -c -g3 -Wall -DIMC -DIMCSMAUG imc.c
In file included from mud.h:56,
from imc.c:68:
imc.h:602: parse error before `ch'
imc.h:605: parse error before `ch'
imc.h:606: parse error before `ch'
imc.h:607: parse error before `ch'
imc.h:608: parse error before `ch'
make[1]: *** [imc.o] Error 1
Anyways, I know thats not very specific, but I was wondering if you might point me to where to look to fix the parse error, or even telling me what a parse error really is. All of my experience in my past with parse errors just usually turned out to be something like a small spelling error or such. Anyways, if you want to see lines 602-608 of imc.h then I'll post it, just ask. As always, thanks for all the help. |
~Nick Cash
http://www.nick-cash.com | Top |
|
Posted by
| Boborak
USA (228 posts) Bio
|
Date
| Reply #1 on Sat 03 May 2003 01:18 AM (UTC) |
Message
| This caught my eye: "In file included from mud.h:56"
this suggests you have #include "imc.h" at almost the very top of your mud.h. If this is the case, then I can assume lines 602, 605, ect. are something like (CHAR_DATA *ch, ). The compiler is giving you a syntax error because CHAR_DATA has yet to be declared. Try moving the #include call way below the CHAR_DATA declaration, around line 300 should do, and then try a recompile.
A syntax error is when the compiler receives something it's not expecting. For example, the compiler expects most commands to end in a ; if you had the following lines:
temp = 5
temp2 = 6;
You would get a syntax error on the first line, because the compiler is expecting a ; it did not receive. On the same note:
void (CHAR_DATA *ch, int bleh );
void (ASDFASDJF *ch, int bleh );
Are seen as the same thing by the compiler if CHAR_DATA had not been declared. A jumble of letters.
Hope this helps. | Top |
|
Posted by
| Nick Cash
USA (626 posts) Bio
|
Date
| Reply #2 on Sat 03 May 2003 04:52 AM (UTC) |
Message
| Thanks, works fine now. :) Thanks for helping me improve upon my knowledge of coding also. |
~Nick Cash
http://www.nick-cash.com | Top |
|
Posted by
| Boborak
USA (228 posts) Bio
|
Date
| Reply #3 on Sat 03 May 2003 05:45 AM (UTC) |
Message
| No problem. Every little bit helps. Many times I learn something myself when helping others out, so it's a win-win situation. ;-) | 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.
13,328 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top