01.01.2010, 06:27
hello,
I'm trying to make a dynamic object loading from a file function.
Is there any way I can load PAWN code from a file?
I'm trying to make a dynamic object loading from a file function.
Code:
public LoadObjects()
{
new string[64];
for(new i = 1; i < MAX_OBJECT_FILES; i++)
{
format(string, sizeof(string), "/Objects/%d.sf", i);
new File:ObjFile = fopen(string, io_read);
if(fexist(string))
{
new lines;
new objects[500];
while(fread(ObjFile, objects))
{
lines++;
objects;
}
}
}
return 1;
}

