All pastes #285089 Raw Edit

Stuff

public text v1 · immutable
#285089 ·published 2006-12-19 16:32 UTC
rendered paste body

ReadConf()
{
new MyVal[256];
new File:cfg=fopen("rumble.cfg", io_read);
new string[256];
while(fread(cfg, string)){
 if(strcmp(string, "MyVal", true)==0) { MyVal=GetVal(1, string); }
 }
}

GetVal(numb, str[]) {
 new tmp[256], idx;
 for(new i=0; i<numb; i++) {
  tmp=strtok(str, idx);
 }
 return strval(tmp);
}


THE ERROR: C:\Documents and Settings\Koenie\Mijn documenten\MPGTARumble.pwn(36) : error 033: array must be indexed (variable "MyVal")