Why this crash the server?
#1

Hi.
I have a command that crashes the server.
If you write /staff, you can insert a write, that appears on your head.
But when you insert the write in the dialog, and press OK, the server crashes.
Here's the code!
pawn Код:
if(dialogid == DIALOG_STAFF)
    {
    if(response)
    {
    if(!strlen(inputtext))
    {
    ShowPlayerDialog(playerid, DIALOG_STAFF, DIALOG_STYLE_INPUT, "Inserisci il testo", "Inserisci il testo che vuoi nel tuo titolo.", "Vai!", "Annulla");
    }
    Delete3DTextLabel(PlayerLabel[playerid]);
    new stringa[256];
    format(stringa, sizeof(stringa), "{62b382}• %s •", inputtext);
    PlayerLabel[playerid] = Create3DTextLabel(stringa, WHITE, 0.0, 0.0, 0.0, 20.0, 0, 1);
    Attach3DTextLabelToPlayer(PlayerLabel[playerid], playerid, 0.0, 0.0, 0.4);
    SendClientMessage(playerid, WHITE, "SERVER: Messaggio %s messo sopra la tua testa.");
    }
    }
//And the cmd
    if (strcmp(cmd, "/staff", true) == 0)
    {
       if(PlayerInfo[playerid][pAdmin] >= 1)
       {
       SendClientMessage(playerid, WHITE, "Inserisci il testo che vuoi.");
       ShowPlayerDialog(playerid, DIALOG_STAFF, DIALOG_STYLE_INPUT, "Inserisci il testo", "Inserisci il testo che vuoi nel tuo titolo.", "Vai!", "Annulla");
       }
       return 1;
    }
Thanks...
Reply


Messages In This Thread
Why this crash the server? - by alanhutch - 15.10.2014, 21:16
Re: Why this crash the server? - by IceCube! - 15.10.2014, 21:39
Re: Why this crash the server? - by Salva2000 - 16.10.2014, 16:42

Forum Jump:


Users browsing this thread: 3 Guest(s)