is string \ - 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: is string \ (
/showthread.php?tid=635970)
is string \ -
Bussyman - 17.06.2017
Hi,
HOw to check is string \ ?
Re: is string \ -
AfiqIqbal - 17.06.2017
You want to check if player type "\" ??
Re: is string \ -
Bussyman - 17.06.2017
No.
I have string like that
new string[ 50 ] = "\n";
and i need if in specific array slot
if( string[ 0 ] == "\\")
{
}
but that not work
Re: is string \ -
Banditul18 - 17.06.2017
Every "slot" of string can contain only a single character
if(string[0] == '/' && string[1] == '/')
//Do something
Re: is string \ -
Vince - 17.06.2017
If you want to check a single character then you need to use single quotes, not double quotes.
Re: is string \ -
DavidBilla - 17.06.2017
Code:
new string[64];
for(new i=0;i++;i<sizeof(string))
{
if(string[i]=='\' && string[i+1]=='n')
{
//your function
}
}
i guess this is what you're asking for