Why name and pwd in OnClientAuthenticate always return different values with the same client name?
How can i work with these variables?
Printable View
Why name and pwd in OnClientAuthenticate always return different values with the same client name?
How can i work with these variables?
this may help you
https://www.vaultmp.com/showwiki.php?...ntAuthenticate
I've read all Wiki pages before post this. It doesn't help.
so what is your problem? "name" is the clients name and "pwd" the password
I understand what is NAME and PWD means. Read my first message again and, please, try to think before answer.
first of all parameters cant return values, can they? second, name{} is always the clientname, pwd{} always the used password - i tested it, works. third "How can i work with these variables?" what do you want to achieve?
I want to compare pwd to String variable
in c++
works fine for meCode c:
public OnClientAuthenticate(const name {}, const pwd {}) { if(strcmp(pwd,"text") != 0) return false;//Deny connection return true; }
It didn't work in c++ :(
Code cpp:
State VAULTSCRIPT OnClientAuthenticate(String name, String pwd) noexcept { if(pwd.compare("text") != 0) return False; return True; }