Dialog crash
#1

Hey, so i have a lot of dialogs on my server with different styles, every dialog works, but there's a problem with DIALOG_STYLE_INPUT, when the dialog displays to the player and if the player types like: "%s%s%s%s%s" in the dialog, it will cause the server to crash. I have tested it a few times and it actually crashes the server. I didn't open the server yet, but i just want to be safe and fix it, is there any way to fix it?
Reply
#2

what did u exactly wrote in a dialog and which version of SA:MP u're using? (I mean 0.3.8, 0.3.DL or 0.3.7?)
Reply
#3

add this:
PHP код:
for (new istrlen(inputtext); l++)
    {
        if (
inputtext[i] == '%')
        {
            
inputtext[i] = '#';
            }
        } 
at the top of OnDialogResponse and it'll replace all of the invalid values.
Reply
#4

Quote:
Originally Posted by RogueDrifter
Посмотреть сообщение
add this:
PHP код:
for (new istrlen(inputtext); l++)
    {
        if (
inputtext[i] == '%')
        {
            
inputtext[i] = '#';
            }
        } 
at the top of OnDialogResponse and it'll replace all of the invalid values.
Hey i tried this code you sent but when i compiled the script the pawn stopped working

EDIT: I forgot a bracket, this actually worked! Thank you so much, +REP.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)