Welcome to the Builder Academy

Question Duplicate error in class.c

More
15 Nov 2017 21:15 #7098 by Sascha
This didn't happen in 3.67. I ran from a fresh install on my test machine just to test it out, and it's consistent. This is after adding levels in class.c for each class. In 3.67 it was fine, in 3.68 this is erroring as follows:

class.c: In function ‘level_exp’:
class.c:2177:7: error: duplicate case value
case LVL_IMMORT: return 50000000;
^~~~
class.c:2146:7: error: previously used here
case 31: return 10000000;
^~~~
class.c:2245:9: error: duplicate case value
case LVL_IMMORT: return 50000000;
^~~~
class.c:2214:9: error: previously used here
case 31: return 10000000;
^~~~
class.c:2313:9: error: duplicate case value
case LVL_IMMORT: return 50000000;
^~~~
class.c:2282:9: error: previously used here
case 31: return 10000000;
^~~~
class.c:2381:9: error: duplicate case value
case LVL_IMMORT: return 50000000;
^~~~
class.c:2350:9: error: previously used here
case 31: return 10000000;


Basically it's telling me that (for example) the exp for a warrior at level 31 is the same as the exp for a rogue at level 31, so it doesn't like it, and that it doesn't like that the lvl_immort is the same for all the classes either. It's only doing it at level 31 and lvl_immort, and completely ignoring that the exp level values for all classes at all levels are the same as well.

Should it be doing that? It didn't before.

Thanks!

Will you stand against the coming Storm? After the Breaking: STORMRIDERS MUD - atbmud.dune.net port 4000

Please Log in or Create an account to join the conversation.

More
15 Nov 2017 21:38 #7100 by WhiskyTest
In Structs.h

Change these:

#define LVL_IMPL 34 /**< Level of Implementors */
#define LVL_GRGOD 33 /**< Level of Greater Gods */
#define LVL_GOD 32 /**< Level of Gods */
#define LVL_IMMORT 31 /**< Level of Immortals */
The following user(s) said Thank You: Sascha

Please Log in or Create an account to join the conversation.

More
15 Nov 2017 23:26 #7101 by Sascha
Replied by Sascha on topic Duplicate error in class.c
I think this is one of those classic cases where I was working with this for so long that I missed the obvious, and need a break. Obviously. :) Thank you!

Will you stand against the coming Storm? After the Breaking: STORMRIDERS MUD - atbmud.dune.net port 4000

Please Log in or Create an account to join the conversation.

More
16 Nov 2017 00:19 #7102 by WhiskyTest
Haha yes, also swap head->wall banging with coffee ?

Please Log in or Create an account to join the conversation.

More
16 Nov 2017 00:51 #7104 by Sascha
Replied by Sascha on topic Duplicate error in class.c
Some days you get the code, some days the code gets you... Or something like that. I made a lot of progress today for someone who's only taken one official C class. I'm up to the challenge!

Will you stand against the coming Storm? After the Breaking: STORMRIDERS MUD - atbmud.dune.net port 4000

Please Log in or Create an account to join the conversation.

Time to create page: 0.261 seconds