SAMP Bug?:|
#1

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 ...
Reply
#2

Thats a script bug, not a samp bug.
Reply
#3

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?
Reply
#4

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


Forum Jump:


Users browsing this thread: 2 Guest(s)