26 errors... - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: 26 errors... (
/showthread.php?tid=592205)
Problem with "floatround" -
Bodie - 21.10.2015
Hi.
I have a problem with "floatround".
pawn Код:
SendClientMessage(playerid, -1, "Check");
new coef = floatround(VEH[model-400][PRIX]*0.0005, floatround_floor);
SendClientMessage(playerid, -1, "Check 2");
House[houseid][Var] += coef;
SendClientMessage(playerid, -1, "Check 3");
The debug for "Check" and "Check 2" is good, but Check 3 does not appear...
In my enum "House", "Var" is not a float.
How to fix my problem?
++
Re: 26 errors... -
Sh4d0w2 - 21.10.2015
Show us your code....
Re : 26 errors... -
Bodie - 27.10.2015
Hi.
I UP the topic.
++
Re: 26 errors... -
Mencent - 27.10.2015
Hello!
You can check this:
PHP код:
SendClientMessage(playerid, -1, "Check");
new coef = floatround(VEH[model-400][PRIX]*0.0005, floatround_floor);
printf("coef = %d",coef);
SendClientMessage(playerid, -1, "Check 2");
House[houseid][Var] += coef;
SendClientMessage(playerid, -1, "Check 3");
What is printing in the console (server.log)?
Re : 26 errors... -
Bodie - 27.10.2015
server_log.txt:
coef = 8
Re: 26 errors... -
Mencent - 27.10.2015
PHP код:
SendClientMessage(playerid, -1, "Check");
new coef = floatround(VEH[model-400][PRIX]*0.0005, floatround_floor);
printf("coef = %d",coef);
printf("coef + Var = %d",House[houseid][Var]+coef);
SendClientMessage(playerid, -1, "Check 2");
House[houseid][Var] += coef;
SendClientMessage(playerid, -1, "Check 3");
And what is printing if you write it so?
Re: 26 errors... -
iKarim - 27.10.2015
PHP код:
new coef;
coef = floatround(VEH[model-400][PRIX]*0.0005, floatround_floor);
new value;
value = House[houseid][Var] + coef;
printf("Value: %i", value);
House[houseid][Var] = value;
printf("Var Value: %i", value);
If it didn't work, Show me your server log.
Re: 26 errors... -
J0sh... - 27.10.2015
Quote:
Originally Posted by PawnHunter
PHP код:
new coef;
coef = floatround(VEH[model-400][PRIX]*0.0005, floatround_floor);
new value;
value = House[houseid][Var] + coef;
printf("Value: %i", value);
House[houseid][Var] = value;
printf("Var Value: %i", value);
If it didn't work, Show me your server log.
|
You did the same things as the fellow above you but you created a not needed integer
Re: 26 errors... -
Crystallize - 27.10.2015
Quote:
Originally Posted by Jamester
You did the same things as the fellow above you but you created a not needed integer 
|
he's pawn hunter , he hunts pawn
Re : Re: 26 errors... -
Bodie - 27.10.2015
Quote:
Originally Posted by PawnHunter
PHP код:
new coef;
coef = floatround(VEH[model-400][PRIX]*0.0005, floatround_floor);
new value;
value = House[houseid][Var] + coef;
printf("Value: %i", value);
House[houseid][Var] = value;
printf("Var Value: %i", value);
If it didn't work, Show me your server log.
|
Not work.
0 printf in my logs