Same script doesnt work on linux same as in window servers
#1

Alright, so I get some kind of strange thing, I use same script, same plugins, on windows server it works fine, but when I upload to my linux server, server just crash, here is code part which cause the crash.

pawn Код:
public GiveRealMoney(playerid,money)
{
    SCM(playerid,-1,"2");
    if(IsPlayerAttachedObjectSlotUsed(playerid,1))
    {
        RemovePlayerAttachedObject(playerid,1);
    }
    if(IsPlayerAttachedObjectSlotUsed(playerid,2))
    {
        RemovePlayerAttachedObject(playerid,2);
    }
    SCM(playerid,-1,"3");//Here
    Pinfo[playerid][Cash] += money;
    SavePlayerStat(playerid,"PlayerMoney",Pinfo[playerid][Cash]);
    SCM(playerid,-1,"4");
    if(Pinfo[playerid][Local] != IN_CASINO)
    {
        ResetPlayerMoney(playerid);
        GivePlayerMoney(playerid,Pinfo[playerid][Cash]);
    }
    new string[20];
    format(string, sizeof(string), "+$%d",money);
    MoneyTD(playerid,1,string,0x36682CFF);
    SCM(playerid,-1,"7");
    if(Pinfo[playerid][Cash] > 9999)
    {
        SetPlayerAttachedObject(playerid,1,1210,5,0.3,0.1,0.0,0.0,270.0,0.0);
    }
    if(Pinfo[playerid][Cash] > 49999)
    {
        SetPlayerAttachedObject(playerid,2,1210,6,0.3,0.1,0.0,0.0,270.0,0.0);
    }
    return 1;
}
sometimes It cant execute at "2" sometimes it gets till SCM(playerid,-1,"3");

and here is script between 3 and 4
pawn Код:
SavePlayerStat(playerid,stat[],value)
{
    if(Pinfo[playerid][Level] == 0)
    {
        SCM(playerid,COLOR_SAMP,"SERVER: Unable to save your account."); return 1;
    }
    mysql_queryF("UPDATE `users` SET `%s` = '%d' WHERE `id` = '%d'",stat,value,Pinfo[playerid][Sqlid]);
    return 1;
}
Something in this script cause server crash on linux, while on windows working perfectly
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)