Crash Script..
#1

Hey guys,this script crash my GM..

pawn Код:
stock LoadToys(playerid, File[])
{
    new INI:File = INI_Open(UserPath(playerid));
    INI_SetTag(File,"data");

    // Toys
    PlayerInfo[playerid][pToyModel][0] = INI_Int(File, "tModel0");
    PlayerInfo[playerid][pToyModel][1] = INI_Int(File, "tModel1");
    PlayerInfo[playerid][pToyModel][2] = INI_Int(File, "tModel2");
    PlayerInfo[playerid][pToyModel][3] = INI_Int(File, "tModel3");
    PlayerInfo[playerid][pToyModel][4] = INI_Int(File, "tModel4");
    PlayerInfo[playerid][pToyModel][5] = INI_Int(File, "tModel5");
    PlayerInfo[playerid][pToyModel][6] = INI_Int(File, "tModel6");
    PlayerInfo[playerid][pToyModel][7] = INI_Int(File, "tModel7");
    PlayerInfo[playerid][pToyModel][8] = INI_Int(File, "tModel8");
    PlayerInfo[playerid][pToyModel][9] = INI_Int(File, "tModel9");
    // Toys X
    PlayerInfo[playerid][pToyX][0] = INI_Float(File, "tX0"); PlayerInfo[playerid][pToyX][1] = INI_Float(File, "tX1");   PlayerInfo[playerid][pToyX][2] = INI_Float(File, "tX2"); PlayerInfo[playerid][pToyX][3] = INI_Float(File, "tX3");
    PlayerInfo[playerid][pToyX][4] = INI_Float(File, "tX4"); PlayerInfo[playerid][pToyX][5] = INI_Float(File, "tX5");   PlayerInfo[playerid][pToyX][6] = INI_Float(File, "tX6"); PlayerInfo[playerid][pToyX][7] = INI_Float(File, "tX7");
    PlayerInfo[playerid][pToyX][8] = INI_Float(File, "tX8"); PlayerInfo[playerid][pToyX][9] = INI_Float(File, "tX9");
    // Toys Y
    PlayerInfo[playerid][pToyY][0] = INI_Float(File, "tY0"); PlayerInfo[playerid][pToyY][1] = INI_Float(File, "tY1");   PlayerInfo[playerid][pToyY][2] = INI_Float(File, "tY2"); PlayerInfo[playerid][pToyY][3] = INI_Float(File, "tY3");
    PlayerInfo[playerid][pToyY][4] = INI_Float(File, "tY4"); PlayerInfo[playerid][pToyY][5] = INI_Float(File, "tY5");   PlayerInfo[playerid][pToyY][6] = INI_Float(File, "tY6"); PlayerInfo[playerid][pToyY][7] = INI_Float(File, "tY7");
    PlayerInfo[playerid][pToyY][8] = INI_Float(File, "tY8"); PlayerInfo[playerid][pToyY][9] = INI_Float(File, "tY9");
    // Toy Z
    PlayerInfo[playerid][pToyZ][0] = INI_Float(File, "tZ0"); PlayerInfo[playerid][pToyZ][1] = INI_Float(File, "tZ1");   PlayerInfo[playerid][pToyZ][2] = INI_Float(File, "tZ2"); PlayerInfo[playerid][pToyZ][3] = INI_Float(File, "tZ3");
    PlayerInfo[playerid][pToyZ][4] = INI_Float(File, "tZ4"); PlayerInfo[playerid][pToyZ][5] = INI_Float(File, "tZ5");   PlayerInfo[playerid][pToyZ][6] = INI_Float(File, "tZ6"); PlayerInfo[playerid][pToyZ][7] = INI_Float(File, "tZ7");
    PlayerInfo[playerid][pToyZ][8] = INI_Float(File, "tZ8"); PlayerInfo[playerid][pToyZ][9] = INI_Float(File, "tZ9");
    // Toy RX
    PlayerInfo[playerid][pToyRX][0] = INI_Float(File, "tRX0"); PlayerInfo[playerid][pToyRX][1] = INI_Float(File, "tRX1");   PlayerInfo[playerid][pToyRX][2] = INI_Float(File, "tRX2"); PlayerInfo[playerid][pToyRX][3] = INI_Float(File, "tRX3");
    PlayerInfo[playerid][pToyRX][4] = INI_Float(File, "tRX4"); PlayerInfo[playerid][pToyRX][5] = INI_Float(File, "tRX5");   PlayerInfo[playerid][pToyRX][6] = INI_Float(File, "tRX6"); PlayerInfo[playerid][pToyRX][7] = INI_Float(File, "tRX7");
    PlayerInfo[playerid][pToyRX][8] = INI_Float(File, "tRX8"); PlayerInfo[playerid][pToyRX][9] = INI_Float(File, "tRX9");
    // Toy RY
    PlayerInfo[playerid][pToyRY][0] = INI_Float(File, "tRY0");  PlayerInfo[playerid][pToyRY][1] = INI_Float(File, "tRY1");  PlayerInfo[playerid][pToyRY][2] = INI_Float(File, "tRY2");  PlayerInfo[playerid][pToyRY][3] = INI_Float(File, "tRY3");
    PlayerInfo[playerid][pToyRY][4] = INI_Float(File, "tRY4");  PlayerInfo[playerid][pToyRY][5] = INI_Float(File, "tRY5");  PlayerInfo[playerid][pToyRY][6] = INI_Float(File, "tRY6");  PlayerInfo[playerid][pToyRY][7] = INI_Float(File, "tRY7");
    PlayerInfo[playerid][pToyRY][8] = INI_Float(File, "tRY8");  PlayerInfo[playerid][pToyRY][9] = INI_Float(File, "tRY9");
    // Toy RZ
    PlayerInfo[playerid][pToyRZ][0] = INI_Float(File, "tRZ0");  PlayerInfo[playerid][pToyRZ][1] = INI_Float(File, "tRZ1");  PlayerInfo[playerid][pToyRZ][2] = INI_Float(File, "tRZ2");  PlayerInfo[playerid][pToyRZ][3] = INI_Float(File, "tRZ3");
    PlayerInfo[playerid][pToyRZ][4] = INI_Float(File, "tRZ4");  PlayerInfo[playerid][pToyRZ][5] = INI_Float(File, "tRZ5");  PlayerInfo[playerid][pToyRZ][6] = INI_Float(File, "tRZ6");  PlayerInfo[playerid][pToyRZ][7] = INI_Float(File, "tRZ7");
    PlayerInfo[playerid][pToyRZ][8] = INI_Float(File, "tRZ8");  PlayerInfo[playerid][pToyRZ][9] = INI_Float(File, "tRZ9");
    // Toy SX
    PlayerInfo[playerid][pToySX][0] = INI_Float(File, "tSX0");  PlayerInfo[playerid][pToySX][1] = INI_Float(File, "tSX1");  PlayerInfo[playerid][pToySX][2] = INI_Float(File, "tSX2");  PlayerInfo[playerid][pToySX][3] = INI_Float(File, "tSX3");
    PlayerInfo[playerid][pToySX][4] = INI_Float(File, "tSX4");  PlayerInfo[playerid][pToySX][5] = INI_Float(File, "tSX5");  PlayerInfo[playerid][pToySX][6] = INI_Float(File, "tSX6");  PlayerInfo[playerid][pToySX][7] = INI_Float(File, "tSX7");
    PlayerInfo[playerid][pToySX][8] = INI_Float(File, "tSX8");  PlayerInfo[playerid][pToySX][9] = INI_Float(File, "tSX9");
    // Toy SY
    PlayerInfo[playerid][pToySY][0] = INI_Float(File, "tSY0");  PlayerInfo[playerid][pToySY][1] = INI_Float(File, "tSY1");  PlayerInfo[playerid][pToySY][2] = INI_Float(File, "tSY2");  PlayerInfo[playerid][pToySY][3] = INI_Float(File, "tSY3");
    PlayerInfo[playerid][pToySY][4] = INI_Float(File, "tSY4");  PlayerInfo[playerid][pToySY][5] = INI_Float(File, "tSY5");  PlayerInfo[playerid][pToySY][6] = INI_Float(File, "tSY6");  PlayerInfo[playerid][pToySY][7] = INI_Float(File, "tSY7");
    PlayerInfo[playerid][pToySY][8] = INI_Float(File, "tSY8");  PlayerInfo[playerid][pToySY][9] = INI_Float(File, "tSY9");
    // Toy SZ
    PlayerInfo[playerid][pToySZ][0] = INI_Float(File, "tSZ0");  PlayerInfo[playerid][pToySZ][1] = INI_Float(File, "tSZ1");  PlayerInfo[playerid][pToySZ][2] = INI_Float(File, "tSZ2");  PlayerInfo[playerid][pToySZ][3] = INI_Float(File, "tSZ3");
    PlayerInfo[playerid][pToySZ][4] = INI_Float(File, "tSZ4");  PlayerInfo[playerid][pToySZ][5] = INI_Float(File, "tSZ5");  PlayerInfo[playerid][pToySZ][6] = INI_Float(File, "tSZ6");  PlayerInfo[playerid][pToySZ][7] = INI_Float(File, "tSZ7");
    PlayerInfo[playerid][pToySZ][8] = INI_Float(File, "tSZ8");  PlayerInfo[playerid][pToySZ][9] = INI_Float(File, "tSZ9");
    for(new i=0; i<10; i++) // Toys
    {
        if(PlayerInfo[playerid][pToySX][i] == 0) PlayerInfo[playerid][pToySX][i] = 1;
        if(PlayerInfo[playerid][pToySY][i] == 0) PlayerInfo[playerid][pToySY][i] = 1;
        if(PlayerInfo[playerid][pToySZ][i] == 0) PlayerInfo[playerid][pToySZ][i] = 1;
    }

    INI_Close(File);

    return 1;
}
Before I cahnged it it was like this:
pawn Код:
stock LoadToys(playerid, file[])
{
    // Toys
    PlayerInfo[playerid][pToyModel][0] = dini_Int(file, "tModel0");
    PlayerInfo[playerid][pToyModel][1] = dini_Int(file, "tModel1");
    PlayerInfo[playerid][pToyModel][2] = dini_Int(file, "tModel2");
    PlayerInfo[playerid][pToyModel][3] = dini_Int(file, "tModel3");
    PlayerInfo[playerid][pToyModel][4] = dini_Int(file, "tModel4");
    PlayerInfo[playerid][pToyModel][5] = dini_Int(file, "tModel5");
    PlayerInfo[playerid][pToyModel][6] = dini_Int(file, "tModel6");
    PlayerInfo[playerid][pToyModel][7] = dini_Int(file, "tModel7");
    PlayerInfo[playerid][pToyModel][8] = dini_Int(file, "tModel8");
    PlayerInfo[playerid][pToyModel][9] = dini_Int(file, "tModel9");
    // Toys X
    PlayerInfo[playerid][pToyX][0] = dini_Float(file, "tX0"); PlayerInfo[playerid][pToyX][1] = dini_Float(file, "tX1"); PlayerInfo[playerid][pToyX][2] = dini_Float(file, "tX2"); PlayerInfo[playerid][pToyX][3] = dini_Float(file, "tX3");
    PlayerInfo[playerid][pToyX][4] = dini_Float(file, "tX4"); PlayerInfo[playerid][pToyX][5] = dini_Float(file, "tX5"); PlayerInfo[playerid][pToyX][6] = dini_Float(file, "tX6"); PlayerInfo[playerid][pToyX][7] = dini_Float(file, "tX7");
    PlayerInfo[playerid][pToyX][8] = dini_Float(file, "tX8"); PlayerInfo[playerid][pToyX][9] = dini_Float(file, "tX9");
    // Toys Y
    PlayerInfo[playerid][pToyY][0] = dini_Float(file, "tY0"); PlayerInfo[playerid][pToyY][1] = dini_Float(file, "tY1"); PlayerInfo[playerid][pToyY][2] = dini_Float(file, "tY2"); PlayerInfo[playerid][pToyY][3] = dini_Float(file, "tY3");
    PlayerInfo[playerid][pToyY][4] = dini_Float(file, "tY4"); PlayerInfo[playerid][pToyY][5] = dini_Float(file, "tY5"); PlayerInfo[playerid][pToyY][6] = dini_Float(file, "tY6"); PlayerInfo[playerid][pToyY][7] = dini_Float(file, "tY7");
    PlayerInfo[playerid][pToyY][8] = dini_Float(file, "tY8"); PlayerInfo[playerid][pToyY][9] = dini_Float(file, "tY9");
    // Toy Z
    PlayerInfo[playerid][pToyZ][0] = dini_Float(file, "tZ0"); PlayerInfo[playerid][pToyZ][1] = dini_Float(file, "tZ1"); PlayerInfo[playerid][pToyZ][2] = dini_Float(file, "tZ2"); PlayerInfo[playerid][pToyZ][3] = dini_Float(file, "tZ3");
    PlayerInfo[playerid][pToyZ][4] = dini_Float(file, "tZ4"); PlayerInfo[playerid][pToyZ][5] = dini_Float(file, "tZ5"); PlayerInfo[playerid][pToyZ][6] = dini_Float(file, "tZ6"); PlayerInfo[playerid][pToyZ][7] = dini_Float(file, "tZ7");
    PlayerInfo[playerid][pToyZ][8] = dini_Float(file, "tZ8"); PlayerInfo[playerid][pToyZ][9] = dini_Float(file, "tZ9");
    // Toy RX
    PlayerInfo[playerid][pToyRX][0] = dini_Float(file, "tRX0"); PlayerInfo[playerid][pToyRX][1] = dini_Float(file, "tRX1"); PlayerInfo[playerid][pToyRX][2] = dini_Float(file, "tRX2"); PlayerInfo[playerid][pToyRX][3] = dini_Float(file, "tRX3");
    PlayerInfo[playerid][pToyRX][4] = dini_Float(file, "tRX4"); PlayerInfo[playerid][pToyRX][5] = dini_Float(file, "tRX5"); PlayerInfo[playerid][pToyRX][6] = dini_Float(file, "tRX6"); PlayerInfo[playerid][pToyRX][7] = dini_Float(file, "tRX7");
    PlayerInfo[playerid][pToyRX][8] = dini_Float(file, "tRX8"); PlayerInfo[playerid][pToyRX][9] = dini_Float(file, "tRX9");
    // Toy RY
    PlayerInfo[playerid][pToyRY][0] = dini_Float(file, "tRY0"); PlayerInfo[playerid][pToyRY][1] = dini_Float(file, "tRY1"); PlayerInfo[playerid][pToyRY][2] = dini_Float(file, "tRY2"); PlayerInfo[playerid][pToyRY][3] = dini_Float(file, "tRY3");
    PlayerInfo[playerid][pToyRY][4] = dini_Float(file, "tRY4"); PlayerInfo[playerid][pToyRY][5] = dini_Float(file, "tRY5"); PlayerInfo[playerid][pToyRY][6] = dini_Float(file, "tRY6"); PlayerInfo[playerid][pToyRY][7] = dini_Float(file, "tRY7");
    PlayerInfo[playerid][pToyRY][8] = dini_Float(file, "tRY8"); PlayerInfo[playerid][pToyRY][9] = dini_Float(file, "tRY9");
    // Toy RZ
    PlayerInfo[playerid][pToyRZ][0] = dini_Float(file, "tRZ0"); PlayerInfo[playerid][pToyRZ][1] = dini_Float(file, "tRZ1"); PlayerInfo[playerid][pToyRZ][2] = dini_Float(file, "tRZ2"); PlayerInfo[playerid][pToyRZ][3] = dini_Float(file, "tRZ3");
    PlayerInfo[playerid][pToyRZ][4] = dini_Float(file, "tRZ4"); PlayerInfo[playerid][pToyRZ][5] = dini_Float(file, "tRZ5"); PlayerInfo[playerid][pToyRZ][6] = dini_Float(file, "tRZ6"); PlayerInfo[playerid][pToyRZ][7] = dini_Float(file, "tRZ7");
    PlayerInfo[playerid][pToyRZ][8] = dini_Float(file, "tRZ8"); PlayerInfo[playerid][pToyRZ][9] = dini_Float(file, "tRZ9");
    // Toy SX
    PlayerInfo[playerid][pToySX][0] = dini_Float(file, "tSX0"); PlayerInfo[playerid][pToySX][1] = dini_Float(file, "tSX1"); PlayerInfo[playerid][pToySX][2] = dini_Float(file, "tSX2"); PlayerInfo[playerid][pToySX][3] = dini_Float(file, "tSX3");
    PlayerInfo[playerid][pToySX][4] = dini_Float(file, "tSX4"); PlayerInfo[playerid][pToySX][5] = dini_Float(file, "tSX5"); PlayerInfo[playerid][pToySX][6] = dini_Float(file, "tSX6"); PlayerInfo[playerid][pToySX][7] = dini_Float(file, "tSX7");
    PlayerInfo[playerid][pToySX][8] = dini_Float(file, "tSX8"); PlayerInfo[playerid][pToySX][9] = dini_Float(file, "tSX9");
    // Toy SY
    PlayerInfo[playerid][pToySY][0] = dini_Float(file, "tSY0"); PlayerInfo[playerid][pToySY][1] = dini_Float(file, "tSY1"); PlayerInfo[playerid][pToySY][2] = dini_Float(file, "tSY2"); PlayerInfo[playerid][pToySY][3] = dini_Float(file, "tSY3");
    PlayerInfo[playerid][pToySY][4] = dini_Float(file, "tSY4"); PlayerInfo[playerid][pToySY][5] = dini_Float(file, "tSY5"); PlayerInfo[playerid][pToySY][6] = dini_Float(file, "tSY6"); PlayerInfo[playerid][pToySY][7] = dini_Float(file, "tSY7");
    PlayerInfo[playerid][pToySY][8] = dini_Float(file, "tSY8"); PlayerInfo[playerid][pToySY][9] = dini_Float(file, "tSY9");
    // Toy SZ
    PlayerInfo[playerid][pToySZ][0] = dini_Float(file, "tSZ0"); PlayerInfo[playerid][pToySZ][1] = dini_Float(file, "tSZ1"); PlayerInfo[playerid][pToySZ][2] = dini_Float(file, "tSZ2"); PlayerInfo[playerid][pToySZ][3] = dini_Float(file, "tSZ3");
    PlayerInfo[playerid][pToySZ][4] = dini_Float(file, "tSZ4"); PlayerInfo[playerid][pToySZ][5] = dini_Float(file, "tSZ5"); PlayerInfo[playerid][pToySZ][6] = dini_Float(file, "tSZ6"); PlayerInfo[playerid][pToySZ][7] = dini_Float(file, "tSZ7");
    PlayerInfo[playerid][pToySZ][8] = dini_Float(file, "tSZ8"); PlayerInfo[playerid][pToySZ][9] = dini_Float(file, "tSZ9");
    for(new i=0; i<10; i++) // Toys
    {
        if(PlayerInfo[playerid][pToySX][i] == 0) PlayerInfo[playerid][pToySX][i] = 1;
        if(PlayerInfo[playerid][pToySY][i] == 0) PlayerInfo[playerid][pToySY][i] = 1;
        if(PlayerInfo[playerid][pToySZ][i] == 0) PlayerInfo[playerid][pToySZ][i] = 1;
    }
    return 1;
}
Whats wrong with it .. ?
Reply


Messages In This Thread
Crash Script.. - by kubeba59 - 31.01.2014, 14:24

Forum Jump:


Users browsing this thread: 1 Guest(s)