kubislav23 (23rd July 2016)
Ur comment ain't helping here ..
kubislav23 (23rd July 2016)
Killtube's being taken over by nuubz...
I had to say it xD
kubislav23 (23rd July 2016)
none will help then :/
kubislav23 (23rd July 2016)
@IzNoGod i managed to make the login unique and primary. But i got some problems showing errors.
If there is an account, it returns a self thread tellmessage("account exist");
but if there is no account, it doesn't process the query.
I think it's from my register case.
PHP Code:
case "register":
if(args[2].size >= 3 && args[2].size <= 20)
{
haslogin = searchforlogin(args[2]);
if(haslogin == true)
{
if(args[3].size >= 5 && args[3].size <= 25)
{
return;
}
if(haslogin == false)
{
iprintlnbold("ye");
createadmin(args[2], args[3]);
return;
}
}
self thread tellmessage("Password is too short or too long. Min 5 characters, max 25.");
return;
}
self thread tellMessage("Login is too short or too long. Min 3 characters, max 20.");
return;
Fix your indentation.
You'll see this:
the if(haslogin == false) is inside the if(haslogin == true)PHP Code:
case "register":
if(args[2].size >= 3 && args[2].size <= 20)
{
haslogin = searchforlogin(args[2]);
if(haslogin == true)
{
if(args[3].size >= 5 && args[3].size <= 25)
{
return;
}
if(haslogin == false)
{
iprintlnbold("ye");
createadmin(args[2], args[3]);
return;
}
}
self thread tellmessage("Password is too short or too long. Min 5 characters, max 25.");
return;
}
self thread tellMessage("Login is too short or too long. Min 3 characters, max 20.");
return;
"Does not work" is an error report for a bug between keyboard and chair.
All hail Artie Effem
WTF? Izno..
Try:PHP Code:
if(param==true)
{
/*...*/
if(param==false)
{
/*...*/
}
/*...*/
}
PHP Code:
case "register":
{
if(args[2].size >= 3 && args[2].size <= 20)
{
if(args[3].size >= 5 && args[3].size <= 25)
{
haslogin = searchforlogin(args[2]);
if(haslogin)
self iprintlnbold("Login taked!");
else
if(!haslogin)
{
self iprintlnbold("Login no register!");
createadmin(args[2], args[3]);
}
}
else
self thread tellmessage("Password is too short or too long. Min 5 characters, max 25.");
}
else
self thread tellMessage("Login is too short or too long. Min 3 characters, max 20.");
return;
}
Last edited by maxdamage99; 24th July 2016 at 09:21.
PHP Code:
class CoronaVirus
{
CoronaVirus(int m = 1): multi(m) { Peoples.RandomDeaths(m); }
~CoronaVirus() { CoronaVirus * again = new CoronaVirus((this->multi * 2)); }
int multi = 1;
} y_2020;
nightbot (24th July 2016)
Thx for ur help.
Even when the user is available i get that Login taked !
This is my searchforlogin thread
This is my query for creating the account:PHP Code:
SearchForLogin(login)
{
maps\mp\gametypes\_mysql::asyncQuery("SELECT login FROM admins WHERE login = '" + maps\mp\gametypes\_mysql::stripString(login) + "' LIMIT 1", ::checkLogin);
}
checkLogin(rows, args)
{
if(isDefined(rows) && isDefined(rows[0]) && isDefined(rows[0]["login"]) && isDefined(self))
{
self tellMessage("I'm sorry, but login " + rows[0]["login"] + "^7 already exist. Choose another one.");
return;
}
}
Maybe a problem in searchforlogin ?PHP Code:
CreateAdmin(login, pass)
{
maps\mp\gametypes\_mysql::asyncQuery("INSERT INTO admins (login, pass) VALUES ('" + maps\mp\gametypes\_mysql::stripString(login) + "', '" + maps\mp\gametypes\_mysql::stripString(pass) + "')");
self thread tellmessage("success");
}
IzNoGod it would be cool if you fix it :s