SA-MP Forums Archive
Very small scripting help - 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: Very small scripting help (/showthread.php?tid=513954)



Very small scripting help - ZachKnoxx - 18.05.2014

Hello, I've had a very small scripting problem, I've totally derped on scripting skills, and I can't figure this out.

What I want it to do is so the person must type a number from 1-299

This is what I have, can anyone fix this problem and tell me what I did wrong.
Quote:

if((strcmp(">299 ", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("<0")))

So pretty much, I have to type '>299 ' & '<0', any way I could change that so I must type a number between 1 and 299?


Re: Very small scripting help - Vince - 18.05.2014

pawn Код:
if(1 <= strval(tmp) <= 299)



Re: Very small scripting help - ZachKnoxx - 18.05.2014

Quote:
Originally Posted by Vince
Посмотреть сообщение
pawn Код:
if(1 <= strval(tmp) <= 299)
Thanks, something just as simple as that earned you a +rep!