Really need help please - 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)
+--- Thread: Really need help please (
/showthread.php?tid=617992)
Really need help please -
AndreiWow - 29.09.2016
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.
Re: Really need help please -
vassilis - 29.09.2016
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"
Re: Really need help please -
AndreiWow - 29.09.2016
Well.. how can I fix it without removing that feature..?
Re: Really need help please -
vassilis - 29.09.2016
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.
Re: Really need help please -
AndreiWow - 29.09.2016
Yep, removed the restriction and it is working.