Ok, so if a mob doesn't have hitnodice then it automatically creates its own hp pertaining to it's level. I'm trying to give it a different hp amount if it doesn't have it's own hitnodice. I've come up with a problem where when I make I get this warning:
db.c in create_mobile
I put double x; at the top of the function.
Why is it trying to convert? and how would it be fixed?
db.c: In function `CHAR_DATA* create_mobile(MOB_INDEX_DATA*)':
db.c:2767: warning: converting to `short int' from `double'
db.c:2769: warning: converting to `short int' from `double'
make[1]: *** [o/db.o] Error 1
make: *** [all] Error 2
db.c in create_mobile
I put double x; at the top of the function.
if( !pMobIndex->hitnodice )
{
x = number_range(16, 18) + number_range (1, 3);
mob->max_hit = mob->level * x; <----2767
x = (mob->level * .01) * 6;
mob->max_hit += (int) mob->max_hit * x; <-------2769
}
else
mob->max_hit = pMobIndex->hitnodice * number_range( 1, pMobIndex->hitsizedice ) + pMobIndex->hitplus;
mob->hit = mob->max_hit;
Why is it trying to convert? and how would it be fixed?