[GM] ERROR .. PLZ HELP
#1

(1153) : error 047: array sizes do not match, or destination array is too small
(1154) : error 047: array sizes do not match, or destination array is too small
(1164) : error 047: array sizes do not match, or destination array is too small
(1167) : error 047: array sizes do not match, or destination array is too small


pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    if(ViewingMOTD[playerid] == true)return 0;
    if(ReAdding[playerid] == true)
    {
        ReAdding[playerid] = false;
    TextDrawHideForPlayer(playerid,pText[0][playerid]);
    TextDrawHideForPlayer(playerid,MainText[Pano_1]);
    TextDrawHideForPlayer(playerid,MainText[Pano_2]);
    TogglePlayerControllable(playerid,1);
    SpawnAtPlayerPosition[playerid] = 0;
    FindPlayerSpawn(playerid,1);
    new file[64];
        new string[100];
        new ammo[100];
        new xyz,zyx;
    new MODE = BASE;if(ModeType == TDM || ModeType == ARENA){MODE = ARENA;}
        format(file,sizeof(file),"/attackdefend/%d/players/AAD_%s.ini",GameMap,udbName[playerid]);
    if(strval(dini_Get(file,"RoundCode")) == RoundCode && strval(dini_Get(file,"Playing")) == 1 && Current != -1)
        {
          HideAllTextDraws(playerid);
            new tmpteam = strval(dini_Get(file,"Team"));
            CurrentPlayers[gTeam[playerid]]--;
            gTeam[playerid] = tmpteam;
            sTeam[playerid] = gTeam[playerid];
            CurrentPlayers[gTeam[playerid]]++;
            SetPlayerHealthh(playerid,dini_Float(file,"Health"));
            SetPlayerArmor(playerid,dini_Float(file,"Armor"));

            string = dini_Get(file,"Weapons"); // ----ERROR HERE----------------------------------------------------------------
            ammo = dini_Get(file,"Ammo"); // ----ERROR HERE----------------------------------------------------------------

        for(new i = 0; i < MAX_SLOTS; i++)
            {
              TempGuns[playerid][i][GUN] = strval(strtok(string,xyz,','));
                TempGuns[playerid][i][AMMO] = strval(strtok(ammo,zyx,','));
            }
            dini_Set(file,"Weapons","0,0,0,0,0,0,0,0,0,0,0,0");
            dini_Set(file,"Ammo","0,0,0,0,0,0,0,0,0,0,0,0");

            string = dini_Get(file,"Pos");xyz = 0;
            for(new i = 0; i < 4; i++){PlayerPosition[playerid][i] = floatstr(strtok(string,xyz,','));} // ----ERROR HERE-------------------

            string = dini_Get(file,"wSets");xyz = 0;
            for(new i = 0; i < 4; i++){WeaponSet[playerid][i][MODE] = strval(strtok(string,xyz,','));} // ----ERROR HERE-------------------

            SetSpawnInfo(playerid,playerid,FindPlayerSkin(playerid),PlayerPosition[playerid][0],PlayerPosition[playerid][1],PlayerPosition[playerid][2],PlayerPosition[playerid][3],0,0,0,0,0,0);
Reply
#2

pawn Код:
format(string, sizeof(string), dini_Get(file,"Weapons"));
Make all the others like this one.
Reply
#3

Quote:
Originally Posted by MadeMan
pawn Код:
format(string, sizeof(string), dini_Get(file,"Weapons"));
Make all the others like this one.
thakz
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)