hello, problem with a code
unsigned long conTimer = (g_tmCurrent - g_pPlayer->tickConnect);
int expBonus = 1, dropBonus = 1, nextBonus = 100, nextDropBonus = 200; // 0
int timeTill = 0;
if (onlineCnt >= 800)
{
expBonus = 10.0;
nextBonus = 0;
dropBonus = 5.0;
nextDropBonus = 0;
}
else if (onlineCnt >= 700)
{
expBonus = 8.0;
nextBonus = 800;
dropBonus = 4.0;
nextDropBonus = 800;
}
SO i compile and the result is = warning C4244: '=' : conversion from 'double' to 'int'
I change the code to :
unsigned long conTimer = (g_tmCurrent - g_pPlayer->tickConnect);
int expBonus = 1, dropBonus = 1, nextBonus = 100, nextDropBonus = 200; // 0
int timeTill = 0;
if (onlineCnt >= 800)
{
expBonus = (int) 10.0;
nextBonus = 0;
dropBonus = (int) 5.0;
nextDropBonus = 0;
}
else if (onlineCnt >= 700)
{
expBonus = (int) 8.0;
nextBonus = 800;
dropBonus = (int) 4.0;
nextDropBonus = 800;
}
I think is correct no?