SA-MP Forums Archive
string comparing, no strcmp. - 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: string comparing, no strcmp. (/showthread.php?tid=323732)



string comparing, no strcmp. - legodude - 06.03.2012

If i want to compare one word with 500 uswest in the server with strcmp it would hang right? Is there a other way to compare strings?


Re: string comparing, no strcmp. - Vince - 06.03.2012

Quote:
Originally Posted by legodude
Посмотреть сообщение
500 uswest
What?


Re: string comparing, no strcmp. - ikkentim - 06.03.2012

Quote:
Originally Posted by legodude
Посмотреть сообщение
If i want to compare one word with 500 uswest in the server with strcmp it would hang right? Is there a other way to compare strings?
strcmp is the only, good way to compare.
The only other way I can think of is replacing '/w' (for example) in a string like '/w trololol'.
Afterwards compare bother strings.

The bad thing about this is that it can easilly be faked, 'grain/wheat' will trigger this too.