14 Apr, 2011, Liko wrote in the 1st comment:
Votes: 0
Hello,

I'm trying to increased the level cap on the latest TBA mud.
I changed the sbyte level to

struct char_player_data:
long long level;


I also defined the immortal levels as:
#define LVL_OWNER       1000011
#define LVL_IMPL LVL_OWNER - 1 /**< Level of Implementors */
#define LVL_GRGOD LVL_OWNER - 2 /**< Level of Greater Gods */
#define LVL_GOD LVL_OWNER - 3 /**< Level of Gods */
#define LVL_IMMORT LVL_OWNER - 4 /**< Level of Immortals */


When I try to compile I receive this error throughout the compiling:

act.informative.c:1820: warning: overflow in implicit constant conversion
act.informative.c:1820: warning: overflow in implicit constant conversion


Now when I go to the code line its:

{"nohassle", PRF_NOHASSLE, LVL_IMMORT,
if ((complete_cmd_info[i].minimum_level >= LVL_IMMORT) != wizhelp)


Any suggestion on what might be causing this?

I also only just showed two of the warnings that are popping up.
14 Apr, 2011, oenone wrote in the 2nd comment:
Votes: 0
what type is minimum_level ?
14 Apr, 2011, Liko wrote in the 3rd comment:
Votes: 0
Minimum_level in circlemud is LVL_IMMORT - 1. long long level should cover both.
14 Apr, 2011, Kline wrote in the 4th comment:
Votes: 0
I think what is being asked is that since you changed your variable in your play_data struct to "long long" did you also change the "minimum_level" variable inside the struct that defines your command table to "long long"?
14 Apr, 2011, kiasyn wrote in the 5th comment:
Votes: 0
you should use int instead of long long.
14 Apr, 2011, Liko wrote in the 6th comment:
Votes: 0
struct char_player_data
{
char passwd[MAX_PWD_LENGTH+1]; /**< PC's password */
char *name; /**< PC / NPC name */
char *short_descr; /**< NPC 'actions' */
char *long_descr; /**< PC / NPC look description */
char *description; /**< NPC Extra descriptions */
char *title; /**< PC / NPC title */
byte sex; /**< PC / NPC sex */
byte chclass; /**< PC / NPC class */
long long level; /**< PC / NPC level */
struct time_data time; /**< PC AGE in days */
ubyte weight; /**< PC / NPC weight */
ubyte height; /**< PC / NPC height */
};


I dont see the min level your talking about
14 Apr, 2011, Twisol wrote in the 7th comment:
Votes: 0
Kline said:
did you also change the "minimum_level" variable inside the struct that defines your command table to "long long"?
14 Apr, 2011, Liko wrote in the 8th comment:
Votes: 0
hmm i fixed it. silly me ^.^
14 Apr, 2011, Rarva.Riendf wrote in the 9th comment:
Votes: 0
C not being my main strength but I think that may explain:
http://gcc.gnu.org/onlinedocs/gcc/Long-L...

I think the >=expect two value of the same type and LVL_IMMORT is probably an int (1 million has no need for a long long use really)
if ((complete_cmd_info.minimum_level >= LVL_IMMORT) != wizhelp) (and I do not understand what this code do anyway, wizhelp is a boolean or what ?

basically…stick to int…unless you intend to go past 2billions for levels, and I doubt you want that…
0.0/9