My Server dosent want anyone to loose money :(
#1

Hello, i have this System:

pawn Код:
new Float:strafkmh = 20;
                                new Float:strafkmh2 = distance-70;
                                new Float:strafe = strafkmh2*strafkmh;
                                SendClientMessage(i, COLOR_YELLOW, "~~~~~~~~~~~~~~~~~~ Geblitzt ~~~~~~~~~~~~~~~~~~");
                                format(string, 256, " Geschwindigkeit: %.0f KM/H        erlaubt: 50 KM/H",distance);
                                SendClientMessage(i, COLOR_YELLOW, string);
                                format(string, 256, " Kosten: %.0f",strafe);
                                SendClientMessage(i, COLOR_YELLOW, string);
                                GivePlayerPCash(i, -strafe);
                                SendClientMessage(i, COLOR_YELLOW, "~~~~~~~~~~~~~~~~~~ Geblitzt ~~~~~~~~~~~~~~~~~~");
All works fine, exempt the GivePLayerPCash...

Pawno says:
pawn Код:
C:\Dokumente und Einstellungen\Plato\Desktop\GM\Euro Version\gamemodes\grl.pwn(8108) : warning 213: tag mismatch

Line:
pawn Код:
GivePlayerPCash(i, -strafe);
Has anyone a Idea?
Reply
#2

Because money is not float, it is numeric.
Reply
#3

Quote:
Originally Posted by Dujma
Because money is not float
any way to get it work?
Reply
#4

Change
pawn Код:
new Float:strafe = strafkmh2*strafkmh;
to
new strafe = strafkmh2*strafkmh;
Reply
#5

i thing this wont work.. because then it says again

2185621795621789 Euro......

but i will try it... but not now because i must get my Visual Basic to work first...

EDIT: WTF?? Again the same warning....
Reply
#6

Quote:
Originally Posted by Plato
i thing this wont work.. because then it says again

2185621795621789 Euro......

but i will try it... but not now because i must get my Visual Basic to work first...

EDIT: WTF?? Again the same warning....
Leave those floats and try to change this
pawn Код:
new Float:strafkmh = 20.0;
new Float:strafkmh2 = distance-70.0;
I think the money should work because you are not using any decimals %.0f
Reply
#7

You are Wrong!

pawn Код:
new Float:strafkmh = 20;
                                new Float:strafkmh2 = distance-70;
                                new Float:strafe = strafkmh2*strafkmh;
                                SendClientMessage(i, COLOR_YELLOW, "~~~~~~~~~~~~~~~~~~ Geblitzt ~~~~~~~~~~~~~~~~~~");
                                format(string, 256, " Geschwindigkeit: %.0f KM/H        erlaubt: 50 KM/H",distance);
                                SendClientMessage(i, COLOR_YELLOW, string);
        Look Here!! >>>>>           format(string, 256, " Kosten: %.0f",strafe);
                                SendClientMessage(i, COLOR_YELLOW, string);
                                GivePlayerPCash(i, -strafe);
                                SendClientMessage(i, COLOR_YELLOW, "~~~~~~~~~~~~~~~~~~ Geblitzt ~~~~~~~~~~~~~~~~~~");

and when i remove the %.Of... then it says xxxxxxxxxxxxxxxxxxxx Money exempt the Real Money
Reply
#8

Quote:
Originally Posted by Plato
You are Wrong!

pawn Код:
new Float:strafkmh = 20;
                                new Float:strafkmh2 = distance-70;
                                new Float:strafe = strafkmh2*strafkmh;
                                SendClientMessage(i, COLOR_YELLOW, "~~~~~~~~~~~~~~~~~~ Geblitzt ~~~~~~~~~~~~~~~~~~");
                                format(string, 256, " Geschwindigkeit: %.0f KM/H        erlaubt: 50 KM/H",distance);
                                SendClientMessage(i, COLOR_YELLOW, string);
        Look Here!! >>>>>           format(string, 256, " Kosten: %.0f",strafe);
                                SendClientMessage(i, COLOR_YELLOW, string);
                                GivePlayerPCash(i, -strafe);
                                SendClientMessage(i, COLOR_YELLOW, "~~~~~~~~~~~~~~~~~~ Geblitzt ~~~~~~~~~~~~~~~~~~");
lol I'm saying that you are not using any decimals (1.decimals). That means that you are using %.0f not something like %.3f, %.4f...
Reply
#9

okay then sry... but why it still says the same when i do this 20.0 and 70.0??
Reply
#10

use floatround
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)