forward VipCount(); public VipCount() { static tmp[128]; new File:ss=fopen(FILE_VIP,io_read); while(fread(ss,tmp)) { if(strfind(tmp, "=") != -1) { DOF2_SetInt(FILE_VIP, strtok(strr,0,'='), strval(tmp)-1); } } fclose(ss); return 1; }
error 017: undefined symbol "strr"
error 035: argument type mismatch (argument 2)
Код:
forward VipCount(); public VipCount() { static tmp[128]; new File:ss=fopen(FILE_VIP,io_read); while(fread(ss,tmp)) { if(strfind(tmp, "=") != -1) { DOF2_SetInt(FILE_VIP, strtok(strr,0,'='), strval(tmp)-1); } } fclose(ss); return 1; } Код:
error 017: undefined symbol "strr" Код:
error 035: argument type mismatch (argument 2) |
VipCount()
forward MinutaFunc(); public MinutaFunc() { gettime(Hours, Minutes); if(Hours == 23 && Minutes == 59){ VipCount(); } return 1; }
forward VipCount();
public VipCount()
{
static tmp[128], str[127], pos;
//Using io_read on nonexisting file will crash the server
if(fexist(FILE_VIP)) {
new File:ss = fopen(FILE_VIP,io_read);
while(fread(ss,tmp))
{
pos = strfind(tmp, "=");
if(pos != -1) {
strmid(str, tmp, pos+1, strlen(tmp));
strmid(tmp, tmp, 0, pos-1);
DOF2_SetInt(FILE_VIP, tmp, strval(str)-1);
}
}
fclose(ss);
}
return 1;
}