[Help] Adding +1 (OffLine) (INI_WriteInt)
#1

Hello, can someone explain me how to add +1 on Warn, if user have 3 warns, i want to make function u type /offwarn Nickname, and then script add +1

I tryed this but gives me error

Short code for CMD
Код:
YCMD:offwarn(playerid, params[],help)
{
        #pragma unused help
	new player[64],yinifile[64];
	if(sscanf(params,"s[64]", player)) return SCM(playerid,-1,"/offwarn [NICK]");
	format(yinifile, sizeof(yinifile),USER_PATH,player);
	new INI:iniFile = INI_Open(yinifile);
	INI_WriteInt(iniFile,"Warn",PlayerInfo[player][pWarns]++); // "player" is wrong... 
	INI_Close(iniFile);
  	return 1;
}
error 033: array must be indexed (variable "player")
Reply


Messages In This Thread
[Help] Adding +1 (OffLine) (INI_WriteInt) - by David (Sabljak) - 05.11.2015, 15:14
Re: [Help] Adding +1 (OffLine) (INI_WriteInt) - by AbyssMorgan - 05.11.2015, 15:24
Re: [Help] Adding +1 (OffLine) (INI_WriteInt) - by David (Sabljak) - 05.11.2015, 17:27
Re: [Help] Adding +1 (OffLine) (INI_WriteInt) - by Jefff - 05.11.2015, 21:12
Re: [Help] Adding +1 (OffLine) (INI_WriteInt) - by David (Sabljak) - 06.11.2015, 09:00

Forum Jump:


Users browsing this thread: 1 Guest(s)