GetPVarFloat, SetPVarFloat problems
#1

Hi there ! I'm using PVars because i think it's very practical.

I'm using this code:

pawn Код:
yazi = "SpawnX";
    SetPVarFloat ( oid, yazi, PlayerBilgiFloat ( username, yazi, deger3 ) );
    yazi = "SpawnY";
    SetPVarFloat ( oid, yazi, PlayerBilgiFloat ( username, yazi, deger3 ) );
    yazi = "SpawnZ";
    SetPVarFloat ( oid, yazi, PlayerBilgiFloat ( username, yazi, deger3 ) );
    yazi = "SpawnA";
    SetPVarFloat ( oid, yazi, PlayerBilgiFloat ( username, yazi, deger3 ) );
    yazi = "SpawnI";
    SetPVarInt ( oid, yazi, PlayerBilgiInt ( username, yazi, deger2 ) );
    yazi = "SpawnW";
    SetPVarInt ( oid, yazi, PlayerBilgiInt ( username, yazi, deger2 ) );
but somethings are going to wrong.

When I use it:

pawn Код:
new Float: SpawnX, Float: SpawnY, Float: SpawnZ, Float: SpawnA, SpawnI, SpawnW;
   
    SpawnX = GetPVarFloat ( oid, "SpawnX" );
    SpawnY = GetPVarFloat ( oid, "SpawnY" );
    SpawnZ = GetPVarFloat ( oid, "SpawnZ" );
    SpawnA = GetPVarFloat ( oid, "SpawnA" );
    SpawnI = GetPVarInt ( oid, "SpawnI" );
    SpawnW = GetPVarInt ( oid, "SpawnW" );
   
    printf("PLAYERLOAD2 // SpawnX: %f  SpawnY: %f  SpawnZ: %f  SpawnA: %f  SpawnI: %d  SpawnW: %d",
           SpawnX,
           SpawnY,
           SpawnZ,
           SpawnA,
           SpawnI,
           SpawnW);
This code's output is:

Код:
[18:35:04] PLAYERLOAD2 // SpawnX: 1142845824.000000  SpawnY: -1005641920.000000  SpawnZ: 1099083776.000000  SpawnA: 1132987392.000000  SpawnI: 0  SpawnW: 0
But It must be:

Код:
[18:35:04] PLAYERLOAD2 // SpawnX: 633.776000  SpawnY: -572.489013  SpawnZ: 16.335899  SpawnA: 272.032989  SpawnI: 0  SpawnW: 0
If I use it:

pawn Код:
printf("PLAYERLOAD // SpawnX: %f  SpawnY: %f  SpawnZ: %f  SpawnA: %f  SpawnI: %d  SpawnW: %d",
           PlayerBilgiFloat ( username, "SpawnX", deger3 ),
           PlayerBilgiFloat ( username, "SpawnY", deger3 ),
           PlayerBilgiFloat ( username, "SpawnZ", deger3 ),
           PlayerBilgiFloat ( username, "SpawnA", deger3 ),
           PlayerBilgiInt ( username, "SpawnI", deger2 ),
           PlayerBilgiInt ( username, "SpawnW", deger2 ));
This code's output is:

Код:
[18:35:04] PLAYERLOAD // SpawnX: 633.776000  SpawnY: -572.489013  SpawnZ: 16.335899  SpawnA: 272.032989  SpawnI: 0  SpawnW: 0
so true..

What's problem ?
Reply


Messages In This Thread
GetPVarFloat, SetPVarFloat problems - by Maeglin - 25.10.2010, 15:35
Re: GetPVarFloat, SetPVarFloat problems - by pater - 25.10.2010, 15:43
Re: GetPVarFloat, SetPVarFloat problems - by Maeglin - 25.10.2010, 15:49
Re: GetPVarFloat, SetPVarFloat problems - by Maeglin - 25.10.2010, 16:04
Re: GetPVarFloat, SetPVarFloat problems - by pater - 25.10.2010, 16:07
Re: GetPVarFloat, SetPVarFloat problems - by Maeglin - 25.10.2010, 16:14
Re: GetPVarFloat, SetPVarFloat problems - by pater - 25.10.2010, 16:32
Re: GetPVarFloat, SetPVarFloat problems - by Maeglin - 25.10.2010, 16:36
Re: GetPVarFloat, SetPVarFloat problems - by pater - 25.10.2010, 16:37
Re: GetPVarFloat, SetPVarFloat problems - by Maeglin - 25.10.2010, 16:44

Forum Jump:


Users browsing this thread: 1 Guest(s)