Dialog error
#1

Hey guys
Why do I have this error?
pawn Код:
if(dialogid == RULES2)
    {
        if(response) {
        if(strval(inputtext) == "I agree that I will always follow the rules in any situation.")
        {
        ShowPlayerDialog(playerid,RULES2,DIALOG_STYLE_INPUT,"Rules","IC:\n- You're not allowed to rob players from level 1.\n- You're not allowed to rob more then $5.000,-\n- You're not allowed to scam more then $15.000,-\n- You're not allowed to bunnyhop to go faster.\n- You're not allowed to metagame or powergame\n- You're not allowed to quickshoot.\nTo agree to our rules type in the following sentence:\nI agree that I will always follow the rules in any situation.","Agree","Disagree");
        }
    }
        else
        {
            Kick(playerid);
        }
        return 1;
    }


    return 1;
}
Код:
C:\Users\Bart\Desktop\infinityrp\gamemodes\infinityrp.pwn(664) : error 033: array must be indexed (variable "-unknown-")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.


if(strval(inputtext) == "I agree that I will always follow the rules in any situation.")
Reply
#2

To compare strings you use strcmp, not strval.
Reply
#3

Same error
Reply
#4

Did you make it like
pawn Код:
if( !strcmp(inputtext ,  "I agree that I will always follow the rules in any situation.", true) )
That?
Reply
#5

Thanks it works
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)