[Help]Unknow Command
#1

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
Reply
#2

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

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
Reply
#4

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

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
Reply
#6

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?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)