05.11.2015, 15:14
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
error 033: array must be indexed (variable "player")
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; }