C:\Users\Scripting.Ash-PC\Desktop\Roleplay\gamemodes\roleplay.pwn(111) : warning 202: number of arguments does not match definition C:\Users\Scripting.Ash-PC\Desktop\Roleplay\gamemodes\roleplay.pwn(111) : warning 202: number of arguments does not match definition C:\Users\Scripting.Ash-PC\Desktop\Roleplay\gamemodes\roleplay.pwn(111) : warning 202: number of arguments does not match definition Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 3 Warnings.
enum pInfo
{
pPass[129],
pCash,
pPos,
pAdmin,
pKills,
pDeaths
}
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"PlayerData");
INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
INI_WriteInt(File,"Pos",GetPlayerPos(playerid));
INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
INI_Close(File);
return 1;
}
{
new
INI:File = INI_Open(UserPath(playerid)),
Float:x,
Float:y,
Float:z;
GetPlayerPos(playerid, x, y, z);
INI_SetTag(File,"PlayerData");
INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
INI_WriteFloat(File, "X", x);
INI_WriteFloat(File, "Y", y);
INI_WriteFloat(File, "Z", z)
INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
INI_Close(File);
return 1;
}
For positions, you need 3 floats. One for x, y, and z coordinates.
pawn Код:
|
SetPlayerPos(playerid,PlayerInfo[playerid],x,y,z);
C:\Users\Scripting.Ash-PC\Desktop\Roleplay\gamemodes\roleplay.pwn(337) : error 035: argument type mismatch (argument 2) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
How are you loading the floats on login?
The syntax for SetPlayerPos is playerid, x, y, z |
enum pInfo
{
pPass[129],
pCash,
Float:pPos[3],
pAdmin,
pKills,
pDeaths
}
INI_Float("X", PlayerInfo[playerid][pPos][0]);
INI_Float("Y", PlayerInfo[playerid][pPos][1]);
INI_Float("Z", PlayerInfo[playerid][pPos][2]);
SetPlayerPos(playerid, PlayerInfo[playerid][pPos][0], PlayerInfo[playerid][pPos][1], PlayerInfo[playerid][pPos][2]);
AddPlayerClass(79,-51.0108,2647.7188,63.8999,88.4150,0,0,0,0,0,0);