SA-MP Forums Archive
[Help]Unknow Command - 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: [Help]Unknow Command (/showthread.php?tid=538498)



[Help]Unknow Command - FisherMan - 22.09.2014

Hello, Every One Why its not working
PHP код:
CMD:SaveStats(playeridparams[])
{
          
SendClientMessage(playerid,COLOR_GREEN,"Successful Saved");
          new 
INI:File INI_Open(UserPath(playerid));
          
INI_SetTag(File,"data");
          
INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
          
INI_WriteInt(File,"Score",GetPlayerScore(playerid));
          
INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
          
INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
          
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
          
INI_WriteInt(File,"Wanted",GetPlayerWantedLevel(playerid));
          
INI_Close(File);
          return 
1;

Unknow Command


Re: [Help]Unknow Command - SickAttack - 22.09.2014

Check if "INI_SetTag(File,"data");" is causing the problem.


Re: [Help]Unknow Command - FisherMan - 22.09.2014

Quote:

forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
INI_Int("Password",PlayerInfo[playerid][pPass]);
INI_Int("Score",PlayerInfo[playerid][pScore]);
INI_Int("Cash",PlayerInfo[playerid][pCash]);
INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
INI_Int("Kills",PlayerInfo[playerid][pKills]);
INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
INI_Int("Wanted",PlayerInfo[playerid][pWanted]);
return 1;
}

Quote:

public OnPlayerDisconnect(playerid, reason)
{
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Cash",GetPlayerMoney(playerid)) ;
INI_WriteInt(File,"Score",GetPlayerScore(playerid) );
INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
INI_WriteInt(File,"Wanted",GetPlayerWantedLevel(pl ayerid));
INI_Close(File);
return 1;
}

why Unknow ? CMD:Savestats ?
No There Problem its Complie And INI_SetTag(File,"data"); its working but in this cmd savestats not working


Re: [Help]Unknow Command - XGreen - 22.09.2014

PHP код:
CMD:savestats(playeridparams[]) 
try to replace the capital letters to small letters, like above.


Re: [Help]Unknow Command - Eth - 22.09.2014

Quote:
Originally Posted by XGreen
Посмотреть сообщение
PHP код:
CMD:savestats(playeridparams[]) 
try to replace the capital letters to small letters, like above.
uggghh why didn't I think about that!!!!!

good good :P

that the solve to ur problem fisherman


Re: [Help]Unknow Command - XGreen - 22.09.2014

Quote:
Originally Posted by Eth
Посмотреть сообщение
uggghh why didn't I think about that!!!!!

good good :P

that the solve to ur problem fisherman
thanks!

BTW, can i get the feedback of your problem?