09.08.2014, 01:18
Hello, so I set a timer for autosave in "OnGameModeInit"
}
I'm getting the error:
I understand why it's saying this, but IDK how to correct it, please help.
}
pawn Код:
SetTimer("AutoSave",98000,1); // ******
UsePlayerPedAnims();
SetWeather(9);
EnableStuntBonusForAll(0);
return 1;
public AutoSave()
{
SendClientMessageToAll(playerid, COL_WHITE, "WARNING: Saving player accounts...");
GetPlayerPos( playerid, PosX[ playerid ], PosY[ playerid ], PosZ[ playerid ] );
GetPlayerFacingAngle( playerid, Angle[ playerid ] );
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
INI_WriteInt(File,"Score",PlayerInfo[playerid][pScore]);
INI_WriteInt(File,"Skin",GetPlayerSkin(playerid));
INI_WriteFloat( File, "PositionX", PosX[playerid] );
INI_WriteFloat( File, "PositionY", PosY[playerid] );
INI_WriteFloat( File, "PositionZ", PosZ[playerid] );
INI_WriteFloat( File, "Angle", Angle[ playerid ] );
INI_WriteInt( File, "Interior", GetPlayerInterior( playerid ) );
INI_WriteInt( File, "VirtualWorld", GetPlayerVirtualWorld( playerid ) );
INI_Close(File);
return 1;
}
Код:
error 017: undefined symbol "playerid"