It' not loading The objects from the file :(
#9

Quote:
Originally Posted by GrandTheftGamer
Посмотреть сообщение
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:
Originally Posted by PowerPC603
Посмотреть сообщение
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:
Originally Posted by Raweresh
Посмотреть сообщение
Maybe open this file and press CTRL + H then change ", " to ",".
Loop is not performed

It does not print it
PHP код:
        printf("awrawrawr"); 
PHP код:
 LoadObjectsFromFile(const filename[])
{
    new 
File:file fopen(filenameio_read);
    if (!
file) return 0;
    
TotalObjects 0;
    new 
line[100], modelidFloat:Pos[6];
    while (
fread(fileline))
    {
        
// Use "," as delimiter and read one integer and 6 floats, and store the values in the following variables
        
sscanf(line"p<,>iffffff"modelidPos[0], Pos[1], Pos[2], Pos[3], Pos[4], Pos[5]);
        
ActivityObject[TotalObjects] = CreateDynamicObject(modelidPos[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;

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)