SA-MP Forums Archive
password query - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: password query (/showthread.php?tid=112170)



password query - nesty - 06.12.2009

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?


Re: password query - Correlli - 06.12.2009

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.


Re: password query - nesty - 06.12.2009

ok thanks for the answer now i will fix it