08.12.2014, 11:02
Quote:
How are you trying to run this function? OnGameModeInit/OnFilterScriptInit? Command? Does anything display in the server log where the function should be running?
|
Quote:
Try to remove "stock" from your function and recompile.
If you get errors that this function isn't being called, then it won't print anything either. |
Quote:
Maybe open this file and press CTRL + H then change ", " to ",".
|
It does not print it
PHP код:
printf("awrawrawr");
PHP код:
LoadObjectsFromFile(const filename[])
{
new File:file = fopen(filename, io_read);
if (!file) return 0;
TotalObjects = 0;
new line[100], modelid, Float:Pos[6];
while (fread(file, line))
{
// Use "," as delimiter and read one integer and 6 floats, and store the values in the following variables
sscanf(line, "p<,>iffffff", modelid, Pos[0], Pos[1], Pos[2], Pos[3], Pos[4], Pos[5]);
ActivityObject[TotalObjects] = CreateDynamicObject(modelid, Pos[0], Pos[1], Pos[2], Pos[3], Pos[4], Pos[5], ActivityInfo[ActivityNumber][a_VirtualWorld], ActivityInfo[ActivityNumber][a_Interior]);
TotalObjects++;
printf("awrawrawr");
}
fclose(file);
return printf("Objects Loaded: %d", TotalObjects);
}
PHP код:
public OnFilterScriptInit()
{
LoadObjectsFromFile("ParkourObjects.ini");
return 1;
}