SA-MP Forums Archive
SAMP Bug?:| - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: SAMP Bug?:| (/showthread.php?tid=257522)



SAMP Bug?:| - SkizzoTrick - 26.05.2011

Hello,
Im almost done with a script but im encoutering some problems with the Adress Book System...

1)When i try to add/delete a contact,for example delete one:

It should change the Contact #1 slot in "Nothing" but look what happens:






Here is the code:
pawn Код:
else if (listitem == 1)
                {
                    format(string,sizeof(string),"%s[%d] \n %s[%d] \n %s[%d] \n %s[%d] \n %s[%d]",PlayerInfo[playerid][pCName1],c1,PlayerInfo[playerid][pCName2],c2,PlayerInfo[playerid][pCName3],c3,PlayerInfo[playerid][pCName4],c4,PlayerInfo[playerid][pCName5],c5);
                    ShowPlayerDialog(playerid, 400,DIALOG_STYLE_LIST,"{808000}Adress Book:",string,"Delete","Leave");
                }

    if(dialogid == 400)
        {
            if(response)
            {
                if (listitem == 0)
                {
                    strmid(PlayerInfo[playerid][pCName1], "Nothing", 0, 7, 7);
                    PlayerInfo[playerid][pContact1] = 0;
                    SendClientMessage(playerid,COLOR_WHITE,"[{095F17}Adress-Book{FFFFFF}]:Contact #1 deleted.");
                }
                else if (listitem == 1)
                {
                    strmid(PlayerInfo[playerid][pCName2], "Nothing", 0, 7, 7);
                    PlayerInfo[playerid][pContact2] = 0;
                    SendClientMessage(playerid,COLOR_WHITE,"[{095F17}Adress-Book{FFFFFF}]:Contact #2 deleted.");
                }
                else if (listitem == 2)
                {
                    strmid(PlayerInfo[playerid][pCName3], "Nothing", 0, 7, 7);
                    PlayerInfo[playerid][pContact3] = 0;
                    SendClientMessage(playerid,COLOR_WHITE,"[{095F17}Adress-Book{FFFFFF}]:Contact #3 deleted.");
                }
                else if (listitem == 3)
                {
                    strmid(PlayerInfo[playerid][pCName4], "Nothing", 0, 7, 7);
                    PlayerInfo[playerid][pContact4] = 0;
                    SendClientMessage(playerid,COLOR_WHITE,"[{095F17}Adress-Book{FFFFFF}]:Contact #4 deleted.");
                }
                else if (listitem == 4)
                {
                    strmid(PlayerInfo[playerid][pCName5], "Nothing", 0, 7, 7);
                    PlayerInfo[playerid][pContact5] = 0;
                    SendClientMessage(playerid,COLOR_WHITE,"[{095F17}Adress-Book{FFFFFF}]:Contact #5 deleted.");
                }
            }
        }
Please help,i've got to release this today ...


Re: SAMP Bug?:| - KaleOtter - 26.05.2011

Thats a script bug, not a samp bug.


Re: SAMP Bug?:| - SkizzoTrick - 26.05.2011

Quote:
Originally Posted by KaleOtter
Посмотреть сообщение
Thats a script bug, not a samp bug.
Hmm...yea,i kinda discovered that already.
But wich is the problem?


Re: SAMP Bug?:| - DRIFT_HUNTER - 26.05.2011

Try to change \n with \r\n
I think thats the problem