Reply to this subject
Start a new subject
 
Refresh page
| Posted by |
Robert Powell
Australia (349 posts) bio
|
| Date |
Sun 22 Feb 2004 07:50 AM (UTC) [ quote
] Amended on Sun 22 Feb 2004 07:53 AM (UTC) by Robert Powell
|
| Message |
I just payed for some hosting and upploaded my source and tryed to compile and got the following errors, i have know idea why this would happen but im guessing it has something to do with the compilers, im using the latest mandrake and the server is redhat, any assistance would be great. Oh they say that they have these copmpilers C/C++ Compiler: gcc 2.95.3 & gcc 3.3
locker.c:145: parse error befor `if'
locker.c:145 stray '\' in program
#if defined(KEY)
#undef KEY
#endif
#define KEY( literal, field, value ) \
if ( !str_cmp( word, literal ) ) \
{ \
field = value; \
fMatch = TRUE; \
break; \
}
|
EldhaMUD Game Developments
The_Fury: Lead Developer, Head Coder
http://fury.eldhamud2.org
| top |
|
| Posted by |
Greven
Canada (835 posts) bio
|
| Date |
Reply #1 on Sun 22 Feb 2004 08:23 AM (UTC) [ quote
] |
| Message |
| Sounds like it might be from somewher above that, as I can't see anything wrong with what you have. You can try to simply put it all on one line, it looks ugly, but it may work. |
Nobody ever expects the spanish inquisition!
darkwarriors.net:4848
http://darkwarriors.net | top |
|
| Posted by |
Robert Powell
Australia (349 posts) bio
|
| Date |
Reply #2 on Sun 22 Feb 2004 09:03 AM (UTC) [ quote
] |
| Message |
here is a few lines above it
fclose( fp );
/* Total the weight of the contents */
for( obj = ch->in_room->first_content; obj; obj = obj->next_content )
{
locker->holding = locker->holding + ( obj->weight * obj->count );
}
}
return locker;
}
|
EldhaMUD Game Developments
The_Fury: Lead Developer, Head Coder
http://fury.eldhamud2.org
| top |
|
| Posted by |
Robert Powell
Australia (349 posts) bio
|
| Date |
Reply #3 on Sun 22 Feb 2004 09:18 AM (UTC) [ quote
] |
| Message |
Would you beleive that i managed to fix it, it was spitting the dummy over the final } not having a backslash on it.
Thanks grevem for making me give it some pretty formatting |
EldhaMUD Game Developments
The_Fury: Lead Developer, Head Coder
http://fury.eldhamud2.org
| top |
|
| Posted by |
Nick Gammon
Australia (18,772 posts) bio
Forum Administrator |
| Date |
Reply #4 on Sun 22 Feb 2004 11:46 PM (UTC) [ quote
] |
| Message |
You need to be cautious with the backslashes. You shouldn't need one on the last line, however more importantly, you must not follow them by a space.
eg.
will work, but
#define blah blah \(space here)
blah
Will not work.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|
| Posted by |
Robert Powell
Australia (349 posts) bio
|
| Date |
Reply #5 on Mon 23 Feb 2004 08:28 AM (UTC) [ quote
] |
| Message |
| thanks nick for the clarification, i went back into my source backups and found that i had an errent <space bar> or 3 heh, as i do all of my coding locally, i missed this problem as my compiler seems to not be bothered by such slackness(even if the crappy code was written my resort mud). My host seems to be a lot more strict with the code tho, which i guess can only mean that i will hopefully crash less from my own sloppyness. |
EldhaMUD Game Developments
The_Fury: Lead Developer, Head Coder
http://fury.eldhamud2.org
| 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.
1,451 views.
Reply to this subject
Start a new subject
 
Refresh page
top
Comments to:
Gammon Software support
Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )