SA-MP Forums

Go Back   SA-MP Forums > SA-MP Server > Server Support

Reply
 
Thread Tools Display Modes
Old 29/03/2014, 07:16 AM   #1
Aerotactics
High-roller
 
Aerotactics's Avatar
 
Join Date: Jun 2013
Location: return 0;
Posts: 1,083
Reputation: 112
Default Hosting Issues - Y_ini saving/loading isn't working and OnDialogResponse isn't working.

If you've read my previous threads this will sound familiar.

After being unsure of why these issues were happening, I first thought the Y_ini issues was an issue with the hosts. I know now that it's not the hosts directly, but rather how the server is stored.

In {Host A}, the server was stored in it's own folder without any other parent folders.

In {Host B} and {Host C}, the server is stored in a parent folder named by the server ip address.

{Host A} worked just fine, {Host B} and {Host C} had issues. We're staying on {Host C}.

This leaves me asking how do we fix our script to work in this situation. This may not fix the issue with OnDialogResponse, but we're out of options, and we don't want to take the time to learn MySql if we don't have to. Everything else in the server is up-to-date, besides Streamer. We use an old version so we don't have to add the 12th parameter to all 500+ objects in our server.

At this point, all work on our server is at a stalemate, and it kills me to not be able to progress any farther without fixing this issue. Below you'll find the problematic scripts sections. If you can help fix this issue, it would be greatly appreciated, and rep will be given where it is due.

pawn Code:
//========================Register System========================//
#define DIALOG_REGISTER 450
#define DIALOG_LOGIN 451
#define DIALOG_SUCCESS_1 452
#define DIALOG_SUCCESS_2 453
#define DIALOG_PASSWORDCHANGE 454
#define PATH "/Users/%s.ini"

enum pInfo
{
    pPass,
    pCash,
    pAdmin,
    pBeta,
    pKills,
    pDeaths,
    pVip,
    pBan,
    pScore,
    pSkin,
    pNamecolor,
    pBackpack,
    pRcon,
    pTutorial
}
new PlayerInfo[MAX_PLAYERS][pInfo];

forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
    INI_Int("Password",PlayerInfo[playerid][pPass]);
    INI_Int("Cash",PlayerInfo[playerid][pCash]);
    INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
    INI_Int("Beta",PlayerInfo[playerid][pBeta]);
    INI_Int("Kills",PlayerInfo[playerid][pKills]);
    INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
    INI_Int("Vip",PlayerInfo[playerid][pVip]);
    INI_Int("Score",PlayerInfo[playerid][pScore]);
    INI_Int("Ban",PlayerInfo[playerid][pBan]);
    INI_Int("Skin",PlayerInfo[playerid][pSkin]);
    INI_Int("Namecolor",PlayerInfo[playerid][pNamecolor]);
    INI_Int("Backpack",PlayerInfo[playerid][pBackpack]);
    INI_Int("Rcon",PlayerInfo[playerid][pRcon]);
    INI_Int("Tutorial",PlayerInfo[playerid][pTutorial]);
    return 1;
}

stock UserPath(playerid)
{
    new string[128],playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid,playername,sizeof(playername));
    format(string,sizeof(string),PATH,playername);
    return string;
}

public OnPlayerConnect(playerid)
{
    tutorial[playerid] = 0;
    PlayerTutorial[playerid] = 0;
    RemovePlayerAttachedObject(playerid, 1);
    PlayerInfo[playerid][pBackpack] = 0;
    PlayerInfo[playerid][pNamecolor] = 0;
    PlayerInfo[playerid][pRcon] = 0;
    if(fexist(UserPath(playerid)))
    {
        INI_ParseFile(UserPath(playerid), "LoadUser_data", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Type your password below to login.","Login","Quit");
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...",""COL_WHITE"Type your password below to register a new account.","Register","Quit");
    }
    if (PlayerInfo[playerid][pRcon] == 1)
    {
        SetPVarInt(playerid,"Rcon",1);
    }
    else
    {
        SetPVarInt(playerid,"Rcon",0);
    }
    if (PlayerInfo[playerid][pBan] == 1)
    {
        SendClientMessage(playerid,COLOR_RED, "You are banned from this server!");
        SetTimer("BanTimer", 1000,false);
    }
    SpamCount[playerid]=0;
    muted[playerid]=0;
    if (ToggleBeta == 1)
    {
        if (PlayerInfo[playerid][pBeta] >= 1)
        {
            SetPVarInt(playerid,"Beta",1);
        }
        else if (PlayerInfo[playerid][pBeta] == 0)
        {
            SetPVarInt(playerid,"Beta",0);
        }
    }
    else
    {
        SetPVarInt(playerid,"Beta",0);
    }
    return 1;
}

// OnDialogResponse was too long, but if you REALLY need to see it, I'll add it.
Aerotactics is offline   Reply With Quote
Old 29/03/2014, 08:05 AM   #2
RajatPawar
High-roller
 
RajatPawar's Avatar
 
Join Date: Aug 2011
Location: ヽ༼ຈل͜ຈ༽ノ
Posts: 2,177
Reputation: 320
Default Re: Hosting Issues - Y_ini saving/loading isn't working and OnDialogResponse isn't working.

Is it an option to create a support ticket for Host C, ask them for permission to replicate the folder as in Host A for testing purposes so as to check if the problem lies there?
RajatPawar is offline   Reply With Quote
Old 29/03/2014, 08:49 AM   #3
Aerotactics
High-roller
 
Aerotactics's Avatar
 
Join Date: Jun 2013
Location: return 0;
Posts: 1,083
Reputation: 112
Default Re: Hosting Issues - Y_ini saving/loading isn't working and OnDialogResponse isn't working.

Quote:
Originally Posted by Rajat_Pawar View Post
Is it an option to create a support ticket for Host C, ask them for permission to replicate the folder as in Host A for testing purposes so as to check if the problem lies there?
That's a good idea. I have an open ticket with them already, so I'll ask when I get the chance. I'd like to see if there is also a scripting error somewhere.
Aerotactics is offline   Reply With Quote
Old 30/03/2014, 08:44 AM   #4
Aerotactics
High-roller
 
Aerotactics's Avatar
 
Join Date: Jun 2013
Location: return 0;
Posts: 1,083
Reputation: 112
Default Re: Hosting Issues - Y_ini saving/loading isn't working and OnDialogResponse isn't working.

Bump
Aerotactics is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OnDialogResponse not working skydux123 Scripting Help 1 28/02/2014 01:27 PM
saving system not working - Y_INI Chrillzen Scripting Help 3 16/10/2013 10:40 PM
ondialogresponse (not working help please) cluckintucker Scripting Help 4 28/12/2012 07:48 PM
Colour saving/loading not working DaRoderick Scripting Help 8 12/12/2012 08:13 PM
OnDialogResponse not working MA_proking Scripting Help 3 07/02/2012 09:40 AM


All times are GMT. The time now is 09:03 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.