SA-MP Forums Archive
Problam in the IsEnglish - 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: Problam in the IsEnglish (/showthread.php?tid=326525)



Problam in the IsEnglish - tal_peretz - 17.03.2012

I made stock that checked if the string is in english .. and it's not work -

PHP код:
stock IsEnglish(TMP[])
{
for(new 
0strlen(TMP); h++)
{
if(
TMP[h] > 'a' && TMP[h] < 'Z') return 1;
else return 
0;
}
return 
1;

what not good here?

Thanks


Re: Problam in the IsEnglish - mineralo - 17.03.2012

try this
pawn Код:
stock IsEnglish(TMP[])
{

for(new h = 0; h < strlen(TMP); h++)
{
if(TMP[h] > 'a' && TMP[h] < 'Z')
{
return 1;
}
else return 0;
}

return 1;
}
or
pawn Код:
stock IsEnglish(TMP[])
{
for(new h = 0; h < strlen(TMP); h++)
{
if(TMP[h] > 'a' && TMP[h] < 'Z') return 1;
}
return 0;
}



Re: Problam in the IsEnglish - tal_peretz - 18.03.2012

not good ..

help ? it's always thing that is in english !


Re: Problam in the IsEnglish - Shabi RoxX - 18.03.2012

May be create array of alphabets like a,b,c...z and check if its in array


AW: Problam in the IsEnglish - Tigerkiller - 18.03.2012

or use my language include


Re: AW: Problam in the IsEnglish - tal_peretz - 18.03.2012

Quote:
Originally Posted by Tigerkiller
Посмотреть сообщение
or use my language include
the download for the includ not work for me man ..


Re: Problam in the IsEnglish - tal_peretz - 18.03.2012

jump