This site has been archived and made available for preservation purposes. No edits can be made.
-
Member
OnClientAuthenticate
Why name and pwd in OnClientAuthenticate always return different values with the same client name?
How can i work with these variables?
Last edited by Smoria; 09-09-2012 at 12:17 PM.
-
Member
-
Member
I've read all Wiki pages before post this. It doesn't help.
-
Member
so what is your problem? "name" is the clients name and "pwd" the password
-
Member
I understand what is NAME and PWD means. Read my first message again and, please, try to think before answer.
Last edited by Smoria; 09-09-2012 at 12:37 PM.
-
Member
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?
-
Member
I want to compare pwd to String variable
in c++
Last edited by Smoria; 09-09-2012 at 02:00 PM.
Reason: c++
-
Member
Code c:
public OnClientAuthenticate(const name {}, const pwd {})
{
if(strcmp(pwd,"text") != 0) return false;//Deny connection
return true;
}
works fine for me
-
Member
It didn't work in c++
-
Member
Code cpp:
State VAULTSCRIPT OnClientAuthenticate(String name, String pwd) noexcept
{
if(pwd.compare("text") != 0) return False;
return True;
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules