Help :s
#1

Hello, why is it, that when I load this FS, no one can join my server, they get stucked at "Joining..."?
And in my samp-server.exe it stucks at the FS loading?
http://pastebin.com/BCVWwkt9
Reply
#2

Just try commenting out "LoadProps();" in OnFilterScriptInit, just to see the outcome.
Reply
#3

Quote:
Originally Posted by funky1234
Посмотреть сообщение
Just try commenting out "LoadProps();" in OnFilterScriptInit, just to see the outcome.
If I comment it, it loads everything correctly.
Reply
#4

So then,
pawn Код:
stock LoadProps()
{
    new file[128],ownername[23],name[200],ownerstring[200];
    for(new i = 0; i < MAX_PROPS;i++)
    {
        format(file,sizeof(file),File,i);
        if(INI_Exist(file))
        {
            INI_Open(file);
            INI_ReadString(ownername,"Owner",23);
            INI_ReadString(name,"Name",200);
            format(PInfo[i][Owner],23,"%s",ownername);
            format(PInfo[i][Name],200,"%s",name);
            PInfo[i][XPos] = INI_ReadFloat("XPos");
            PInfo[i][YPos] = INI_ReadFloat("YPos");
            PInfo[i][ZPos] = INI_ReadFloat("ZPos");
            PInfo[i][Price] = INI_ReadInt("Price");
            PInfo[i][Ownings] = INI_ReadInt("Ownings");
            PInfo[i][World] = INI_ReadInt("World");
            PInfo[i][Owned] = INI_ReadInt("Owned");
            PInfo[i][Pickup] = CreatePickup(1273,23,PInfo[i][XPos],PInfo[i][YPos],PInfo[i][ZPos],PInfo[i][World]);
            if(PInfo[i][Owned] == 1)
            {
                format(ownerstring,sizeof(ownerstring),""lyellow2"Prop name: %s \nOwner: %s \nCost: %i \nOwnings: %i \nProperty id: %i",PInfo[i][Name],PInfo[i][Owner],PInfo[i][Price],PInfo[i][Ownings],i);
                PropLabel[i] = Create3DTextLabel(ownerstring,white,PInfo[i][XPos],PInfo[i][YPos],PInfo[i][ZPos]+0.7,PROP_DEFAULT_LABEL_DISTANCE,PInfo[i][World]);
            }
            else
            {
                format(ownerstring,sizeof(ownerstring),""lyellow2"Prop name: %s \nOwner: None \nCost: %i \nOwnings: %i \nProperty id: %i",PInfo[i][Name],PInfo[i][Price],PInfo[i][Ownings],i);
                PropLabel[i] = Create3DTextLabel(ownerstring,white,PInfo[i][XPos],PInfo[i][YPos],PInfo[i][ZPos]+0.7,PROP_DEFAULT_LABEL_DISTANCE,PInfo[i][World]);
            }
            INI_Close();
            PropCount++;
            SetGVarInt("Pickups",GetGVarInt("Pickups")+1);
        }
    }
    printf("Loaded properties: %i",PropCount);
    return 1;
}
Is causing issues. Does it print "Loaded properties.."?
Reply
#5

Quote:
Originally Posted by funky1234
Посмотреть сообщение
So then,
pawn Код:
stock LoadProps()
{
    new file[128],ownername[23],name[200],ownerstring[200];
    for(new i = 0; i < MAX_PROPS;i++)
    {
        format(file,sizeof(file),File,i);
        if(INI_Exist(file))
        {
            INI_Open(file);
            INI_ReadString(ownername,"Owner",23);
            INI_ReadString(name,"Name",200);
            format(PInfo[i][Owner],23,"%s",ownername);
            format(PInfo[i][Name],200,"%s",name);
            PInfo[i][XPos] = INI_ReadFloat("XPos");
            PInfo[i][YPos] = INI_ReadFloat("YPos");
            PInfo[i][ZPos] = INI_ReadFloat("ZPos");
            PInfo[i][Price] = INI_ReadInt("Price");
            PInfo[i][Ownings] = INI_ReadInt("Ownings");
            PInfo[i][World] = INI_ReadInt("World");
            PInfo[i][Owned] = INI_ReadInt("Owned");
            PInfo[i][Pickup] = CreatePickup(1273,23,PInfo[i][XPos],PInfo[i][YPos],PInfo[i][ZPos],PInfo[i][World]);
            if(PInfo[i][Owned] == 1)
            {
                format(ownerstring,sizeof(ownerstring),""lyellow2"Prop name: %s \nOwner: %s \nCost: %i \nOwnings: %i \nProperty id: %i",PInfo[i][Name],PInfo[i][Owner],PInfo[i][Price],PInfo[i][Ownings],i);
                PropLabel[i] = Create3DTextLabel(ownerstring,white,PInfo[i][XPos],PInfo[i][YPos],PInfo[i][ZPos]+0.7,PROP_DEFAULT_LABEL_DISTANCE,PInfo[i][World]);
            }
            else
            {
                format(ownerstring,sizeof(ownerstring),""lyellow2"Prop name: %s \nOwner: None \nCost: %i \nOwnings: %i \nProperty id: %i",PInfo[i][Name],PInfo[i][Price],PInfo[i][Ownings],i);
                PropLabel[i] = Create3DTextLabel(ownerstring,white,PInfo[i][XPos],PInfo[i][YPos],PInfo[i][ZPos]+0.7,PROP_DEFAULT_LABEL_DISTANCE,PInfo[i][World]);
            }
            INI_Close();
            PropCount++;
            SetGVarInt("Pickups",GetGVarInt("Pickups")+1);
        }
    }
    printf("Loaded properties: %i",PropCount);
    return 1;
}
Is causing issues. Does it print "Loaded properties.."?
Yes, but it freezes there instead of continue with like y_ini updates stuff, like it normaly should do.
Reply
#6

But you're not using y_INI?
Reply
#7

Quote:
Originally Posted by funky1234
Посмотреть сообщение
But you're not using y_INI?
Sorry, I'm using YSI.
I men't YSI in the other post.
And I'm using SII.
Reply
#8

Oh haha

Does it go through the loop underneath "LoadProps();"?

(Oh, and another thing - isn't this in the wrong section?)
Reply
#9

What's the definition of 'File' ?
Reply
#10

Quote:
Originally Posted by Zh3r0
Посмотреть сообщение
What's the definition of 'File' ?
pawn Код:
#define File "Admin/Props/%i.ini"
I was just looking at that myself!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)