SA-MP Forums Archive
error 017: undefined symbol "format" - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: error 017: undefined symbol "format" (/showthread.php?tid=137755)



error 017: undefined symbol "format" - Rosco_Rich - 30.03.2010


pawno\include\dutils.inc(431) : error 017: undefined symbol "format"
pawno\include\dutils.inc(431) : warning 215: expression has no effect
pawno\include\dutils.inc(431) : warning 215: expression has no effect
pawno\include\dutils.inc(431) : warning 215: expression has no effect
pawno\include\dutils.inc(431) : warning 215: expression has no effect
pawno\include\dutils.inc(431) : error 001: expected token: ";", but found ")"
pawno\include\dutils.inc(431) : error 029: invalid expression, assumed zero
pawno\include\dutils.inc(431) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase



This is the line of 431

Код:
 stock strreplace(trg[],newstr[],src[]) {
  new f=0;
  new s1[MAX_STRING];
  new tmp[MAX_STRING];
  format(s1,sizeof(s1),"%s",src);
  f = strfind(s1,trg);
  tmp[0]=0;
  while (f>=0) {
    strcat(tmp,ret_memcpy(s1, 0, f));
    strcat(tmp,newstr);
    format(s1,sizeof(s1),"%s",ret_memcpy(s1, f+strlen(trg), strlen(s1)-f));
    f = strfind(s1,trg);
  }
  strcat(tmp,s1);
  return tmp;
}