View Full Version : Complicated SetPlayerPos Errors.

27/08/2011, 08:23 PM
Those are My Errors:

C:\Users\Yuval\Desktop\Server\filterscripts\Server R.pwn(66) : error 035: argument type mismatch (argument 2)
C:\Users\Yuval\Desktop\Server\filterscripts\Server R.pwn(67) : error 035: argument type mismatch (argument 2)

This is my Script:

/*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

27/08/2011, 08:26 PM
The function dini_Get is used to return only strings from a value. Use dini_Float instead.

27/08/2011, 08:26 PM
^^ beat me to it

dini_FloatSet(...) to set a float


dini_Float(...) to get a float.

27/08/2011, 08:30 PM
Ty, My Dudes, Never Knew About the dini_Float... Since Im Using Everytime.