[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Compile error

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: Compile error
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please).
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Posted by Robert Powell   Australia  (349 posts)  [Biography] bio
Date 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
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date 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.


#define blah blah \
  blah


will work, but


#define blah blah \(space here)
  blah


Will not work.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Robert Powell   Australia  (349 posts)  [Biography] bio
Date 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
[Go to top] top

Posted by Robert Powell   Australia  (349 posts)  [Biography] bio
Date 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
[Go to top] top

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date 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
[Go to top] top

Posted by Robert Powell   Australia  (349 posts)  [Biography] 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
[Go to top] 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,432 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]