Saving Trouble
#5

Quote:
Originally Posted by Glad2BeHere
Посмотреть сообщение
pawn Код:
format(file, sizeof(file), "\SavePos\%s.ini", pname);
createfolder
Scriptfiles >>>>> SavePos
I already have that.

I figured out what the problem was, I forgot the set the X Y Z in SetPlayerpos

But when I did that it gave me this:
Код:
public OnPlayerDisconnect(playerid, reason)
{
new file[128], pname[MAX_PLAYER_NAME];
new Float:x, Float:y, Float:z;
GetPlayerName(playerid, pname, sizeof(pname));
format(file, sizeof(file), "\\SavePos\\%s.ini", pname);
if(!dini_Exists(file))
dini_Create(file);
GetPlayerPos(playerid, x, y, z);
dini_FloatSet(file, "posX", x);
dini_FloatSet(file, "posY", y);
dini_FloatSet(file, "posZ", z);
return 1;
}

public OnPlayerSpawn(playerid)
{
new file[128], pname[MAX_PLAYER_NAME];
new Float:x, Float:y, Float:z;
GetPlayerName(playerid, pname, sizeof(pname));
format(file, sizeof(file), "\\SavePos\\%s.ini", pname);
x = dini_Float(file, "posX");
y = dini_Float(file, "posY");
z = dini_Float(file, "posZ");
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerColor(playerid, 0xFFFFFFFF );
return 1;
}
to

Код:
C:\Users\Jason\Desktop\205.234.152.184_7780\gamemodes\OGRP.pwn(1507) : warning 204: symbol is assigned a value that is never used: "z"
C:\Users\Jason\Desktop\205.234.152.184_7780\gamemodes\OGRP.pwn(1506) : warning 204: symbol is assigned a value that is never used: "y"
C:\Users\Jason\Desktop\205.234.152.184_7780\gamemodes\OGRP.pwn(1505) : warning 204: symbol is assigned a value that is never used: "x"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Warnings.
I know the server can still function with warnings, but it gives me OCD
Reply


Messages In This Thread
Saving Trouble - by xXRealLegitXx - 15.02.2013, 23:36
Re: Saving Trouble - by Glad2BeHere - 15.02.2013, 23:45
Re: Saving Trouble - by xXRealLegitXx - 16.02.2013, 00:12
Re: Saving Trouble - by Glad2BeHere - 16.02.2013, 00:13
Re: Saving Trouble - by xXRealLegitXx - 16.02.2013, 00:16
Re : Saving Trouble - by bigtigerbeee - 16.02.2013, 03:48

Forum Jump:


Users browsing this thread: 1 Guest(s)