SA-MP Forums Archive
Complicated SetPlayerPos 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: Complicated SetPlayerPos Errors. (/showthread.php?tid=279478)



Complicated SetPlayerPos Errors. - 4ir-W4ys - 27.08.2011

Those are My Errors:
Код:
C:\Users\Yuval\Desktop\Server\filterscripts\ServerR.pwn(66) : error 035: argument type mismatch (argument 2)
C:\Users\Yuval\Desktop\Server\filterscripts\ServerR.pwn(67) : error 035: argument type mismatch (argument 2)
This is my Script:
pawn Код:
/*Line66*/SetPlayerPos(playerid, dini_Get(playerfile, "PosX"), dini_Get(playerfile, "PosY"), dini_Get(playerfile, "PosZ"));
/*Line67*/SetPlayerFacingAngle(playerid, dini_Get(playerfile, "RotZ"));

// When the Dini_Get's Get's His Values:

public OnPlayerDisconnect(playerid, reason)
{
    if(logged[playerid] == 1)
    {
        new playerfile[100], pname[MAX_PLAYER_NAME];
        new Float:Xp,Float:Yp,Float:Zp,Float:Ap;
        new X[128],Y[128],Z[128],A[128];
        GetPlayerPos(playerid, Xp,Yp,Zp);
        GetPlayerFacingAngle(playerid, Ap);
        GetPlayerName(playerid, pname, sizeof(pname));
        format(playerfile, sizeof(playerfile), "Users/%s.ini",pname);
        format(X, sizeof(X), "%s", Xp);
        format(Y, sizeof(Y), "%s", Yp);
        format(Z, sizeof(Z), "%s", Zp);
        format(A, sizeof(A), "%s", Ap);
            dini_Set(playerfile, "PosX", X);
            dini_Set(playerfile, "PosY", Y);
            dini_Set(playerfile, "PosZ", Z);
            dini_Set(playerfile, "RotZ", A);
    }
    level[playerid] = 0;
    logged[playerid] = 0;
    return 1;
}
Please Help me


Re: Complicated SetPlayerPos Errors. - Cyanide - 27.08.2011

The function dini_Get is used to return only strings from a value. Use dini_Float instead.


Re: Complicated SetPlayerPos Errors. - Whitetiger - 27.08.2011

^^ beat me to it

dini_FloatSet(...) to set a float

&

dini_Float(...) to get a float.


Re: Complicated SetPlayerPos Errors. - 4ir-W4ys - 27.08.2011

Ty, My Dudes, Never Knew About the dini_Float... Since Im Using Everytime.