password query
#1

hi, i am trying to make a password query. but i doesn't work why and why "int" is an undefined symbol?
can someone fix that or just a tip, please?
pawn Код:
if(dialogid == 1)
  {
    int password = "test";
    int input = StrToInt(inputtext);
   
    if(response == 1)
    {
      if(input == password) SendClientMessage(playerid, 0xFFFFFFFF, "Get a Cookie!");
      else SendClientMessage(playerid, 0xFFFFFFFF, "No Cookie");
    }
   
    else SendClientMessage(playerid, 0xFFFFFFFF, "Exit");
    return 1;
  }
How can I compare two datatypes in samp 0.3?
Reply
#2

This is PAWN, not C/C++, so use new instead of int, and use strcmp function to compare strings.
And password needs to be an array.
Reply
#3

ok thanks for the answer now i will fix it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)