Help with Float
#6

I don't understand yet what is your problem, if is the variable float that don't change or the output that can't be in float, or both.

Anyway, your code need a better performece and you need more debugs to know what is the problem.
Btw, your specifier in debug message are wrong, to float is used %f.

Look this:
PHP код:
new Float:kof 1;//str[400];
//debugs
printf("playerDB admin level = %d"playerDB[i][admin]);
printf("playerDB vip level = %d"playerDB[i][vip]);
switch(
playerDB[i][admin])
{
    case 
5kof 2;
    case 
4kof 2;
    case 
3kof 1;
    case 
2kof 0.7;
    case 
1kof 0.4;
    default:
    {
        if(
playerDB[i][vip]) kof 0.2;
    }
}
printf("kof output = %.1f"kof);//.1 = only one decimal place
playerDB[i][VersloPelnas] += playerDB[i][VersloPajamos];
//format(str, sizeof(str), "Verslo koficijentas yra %d", kof);
//SendClientMessage(i, RED, str ); 
Reply


Messages In This Thread
Help with Float - by mokinys98 - 26.04.2018, 11:13
Re: Help with Float - by Xportaler - 26.04.2018, 11:17
Re: Help with Float - by mokinys98 - 26.04.2018, 12:00
Re: Help with Float - by CodeStyle175 - 26.04.2018, 12:14
Re: Help with Float - by mokinys98 - 26.04.2018, 12:24
Re: Help with Float - by Bruno13 - 26.04.2018, 13:08
Re: Help with Float - by AdamsLT - 26.04.2018, 13:35
Re: Help with Float - by mokinys98 - 26.04.2018, 14:05
Re: Help with Float - by AdamsLT - 26.04.2018, 14:21
Re: Help with Float - by mokinys98 - 26.04.2018, 14:34

Forum Jump:


Users browsing this thread: 1 Guest(s)