IS_IN_RANGE - 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_IN_RANGE (
/showthread.php?tid=625328)
IS_IN_RANGE - Whatwasit - 31.12.2016
Hello,
What should I use to stop using "IS_IN_RANGE"
if(IS_IN_RANGE(string[0], '0', '9'))
Thanks
Re: IS_IN_RANGE -
SoLetsGO - 31.12.2016
What do you mean?
And where did you get the function from?
Re: IS_IN_RANGE -
BiosMarcel - 31.12.2016
i don't see any reason to stop using it, where is the problem? What do you even want to achieve?
Re: IS_IN_RANGE - Whatwasit - 31.12.2016
I used it for another server using YSI (
https://sampforum.blast.hk/showthread.php?tid=570949) and i'd like to set it in a server which do not use YSI yet. However, i do not remember the symbol.
The aim is to check that in the string there are numbers and if yes using strval
Re: IS_IN_RANGE -
BiosMarcel - 31.12.2016
Make an equivalent?
PHP код:
isCharacterInRange(character, char1, char2)
{
return (character <= char2 && character >= char1);
}
This would work since characters are just numbers afterall (lookup the ascii table)
Or just ****** for a diffrent method?
Re: IS_IN_RANGE -
PrO.GameR - 31.12.2016
...
Quite literally
PHP код:
if('0'<=string[0]<='9')