Really need help please
#1

Uh, I really don't know why this doesn't work.


I tried to make a clan with the name of [STAFF] also tried [ADMIN] and [AD] neither of those work because I have something to protect the sql, but it doesn't allow the following letters I think 'A, D, S'.

Here is the code:
Код:
static const antisqlinjection[][] =
{
    "'",
    "#",
    "`",
     "%s",
     "%d",
     "%f"
};
And:
Код:
for(new i; i < sizeof(antisqlinjection); i++)
	    {
			if(strfind(inputtext, antisqlinjection[i], true) != -1)
			{
				SCM(playerid, -1, "Nu sunt permise asemenea caractere.");
				return 1;
		   	}
	   	}
Код:
SCM(playerid, -1, "Nu sunt permise asemenea caractere.");
It says that I am not allowed to use those characters, letters.
Reply
#2

Jjust for typical reasons start your loop by for(i = 0;..) .
Anyway, it might do it becaus you have used " % s " and inputtext is an.. input ("%s"). Maybe it reads your input as a string.. "%s"
Reply
#3

Well.. how can I fix it without removing that feature..?
Reply
#4

Quote:
Originally Posted by AndreiWow
Посмотреть сообщение
Well.. how can I fix it without removing that feature..?
Firstly, remove that to check if is that the real problem.
Reply
#5

Yep, removed the restriction and it is working.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)