[Help]Array index out of bounds Problem
#1

when i write a file with yini (Register a player or create and save a house) after writing >>
when a player join and want to register (Server must write his file !) yini doesn't write his file and for showing next dialog (Email dialog...for saving player email) crashdetect plugin print error below and server does not show the email dialog:

pawn Code:
[11:34:17] [debug] Run time error 4: "Array index out of bounds"
[11:34:17] [debug]  Accessing element at negative index -1
[11:34:17] [debug] AMX backtrace:
[11:34:17] [debug] #0 0000d79c in ?? (0xffffffff) from GM.amx
[11:34:17] [debug] #1 0010016c in ?? (0x00000006, 0x00000001, 0x00000001, 0xffffffff, 0x011c6260) from GM.amx
[11:34:17] [debug] #2 00008860 in public OnDialogResponse (0x00000006, 0x00000001, 0x00000001, 0xffffffff, 0x011c6260) from GM.amx
Register Dialog:
pawn Code:
if(dialogid == DIALOG_REGISTER)
      {
            if (!response) return Kick(playerid);
            if(response)
            {
                new INI:File = INI_Open(UserPath(playerid));
                INI_SetTag(File,"data");
                INI_WriteInt(File,"Password",udb_hash(inputtext));
                INI_WriteInt(File,"Cash",25000);
                INI_WriteInt(File,"Score",0);
                INI_WriteInt(File,"HaveBankAcc",0);
                INI_WriteInt(File,"BankCash",0);
                INI_WriteInt(File,"HaveATM",0);
                INI_WriteInt(File,"Admin",0);
                INI_WriteInt(File,"Vip",0);
                INI_WriteInt(File,"AdminExpire",0);
                INI_WriteInt(File,"VipExpire",0);
                INI_WriteInt(File,"Respect",0);
                INI_WriteInt(File,"Playtime",0);
                INI_WriteInt(File,"Kills",0);
                INI_WriteInt(File,"Deaths",0);
                INI_WriteInt(File,"Banned",0);
                INI_WriteInt(File,"TempBanned",0);
                INI_WriteInt(File,"TempBanTime",0);
                INI_WriteInt(File,"POC",0);
                INI_WriteInt(File,"Bombs",0);
                INI_WriteInt(File,"Reports",0);
                INI_WriteInt(File,"Wanted",0);
                INI_WriteInt(File,"Zone",0);
                INI_WriteInt(File,"Weed",0);
                INI_WriteInt(File,"Email",0);
                INI_WriteInt(File,"Jailed",0);
                INI_WriteInt(File,"JailTime",0);
                INI_WriteInt(File,"PolicePunish",0);
                INI_WriteInt(File,"CanPolice",0);
                INI_WriteInt(File,"TeamID",8);
                INI_WriteInt(File,"Skin",295);
                INI_WriteInt(File,"SkinOn",0);
                INI_WriteInt(File,"NameTag",0);
                INI_WriteString(File,"DeathPM","Death PM");
                INI_WriteString(File,"Banreason","None");
                INI_WriteFloat(File,"LastX",0);
                INI_WriteFloat(File,"LastY",0);
                INI_WriteFloat(File,"LastZ",0);
                INI_WriteInt(File,"LastInterior",0);
                INI_WriteInt(File,"LastVW",0);
                INI_WriteInt(File,"PDETimeLimit",0);
                INI_Close(File);
                INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
                ServerInfo[Registered]++;
                format(ServerInfo[NewestPlayer],32,"%s",GetName(playerid));
                ShowPlayerDialog(playerid, pEmailDialog, DIALOG_STYLE_INPUT, "Email", "Please Enter Your Email", "Save", "");
            }
            return 1;
        }
if you want other codes tell me

Please help !
Reply


Messages In This Thread
[Help]Array index out of bounds Problem - by Mamal75 - 13.10.2014, 08:17
Re: [Help]Array index out of bounds Problem - by AnnaSB - 13.10.2014, 09:01
Re: [Help]Array index out of bounds Problem - by Mamal75 - 13.10.2014, 09:05
Re: [Help]Array index out of bounds Problem - by Mamal75 - 13.10.2014, 09:15
Re: [Help]Array index out of bounds Problem - by Mamal75 - 13.10.2014, 10:16
Re: [Help]Array index out of bounds Problem - by Mamal75 - 13.10.2014, 10:58
Re: [Help]Array index out of bounds Problem - by Mamal75 - 13.10.2014, 12:27
Re: [Help]Array index out of bounds Problem - by Mamal75 - 13.10.2014, 14:18
Re: [Help]Array index out of bounds Problem - by AnnaSB - 13.10.2014, 19:46
Re: [Help]Array index out of bounds Problem - by Rudy_ - 14.10.2014, 11:10

Forum Jump:


Users browsing this thread: 4 Guest(s)