28.12.2012, 12:05
Hello, is it possible to use CreateObject or CreateDynamicObject (incognito's streamer) inside a for loop, if yes, how?
Right now I am doing this:
Its running fine with warning: tag mismatch on line where CreateObject is used.
I tried by using CreateObject as well as CreateDynamicObject with the plugin correctly, the script was debugged, and its reading the file 1.txt correctly.
So its not possible to use CreateObject inside for loop ?
Right now I am doing this:
pawn Код:
new i=0;
new File:ftw=fopen("1.txt",io_read);
while(ftw)
{
new string[200];
fread(ftw, string);
if(isnull(string))
return 1;
//printf("\n[%s]",string);
new s[50];
new integ;
new float: x,y,z,rx,ry,rz;
sscanf(string,"p<(>s[50]p<,>ifffffp<)>f",s,integ,x,y,z,rx,ry,rz);
if(strcmp("CreateObject",s,true)==0)
{
//printf("test");
printf("\n[%s]\nInteger=%d\nx=%f\ny=%f\nz=%f\nrx=%f\nry=%f\nrz=%f\n",s,integ,x,y,z,rx,ry,rz);
CreateDynamicObject(integ,x,y,z,rx,ry,rz);
i++;
}
if(i==1)
AddPlayerClass(150,x,y,z+4,5.4011,0,0,0,0,0,0);
}
Its running fine with warning: tag mismatch on line where CreateObject is used.
I tried by using CreateObject as well as CreateDynamicObject with the plugin correctly, the script was debugged, and its reading the file 1.txt correctly.
So its not possible to use CreateObject inside for loop ?