View Single Post
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 07-13-2019 , 13:01   Re: Create Flag on Map 2.0
Reply With Quote #16

Quote:
I don't know why isn't work "containi(modelname,";")!=0" on AmxModx 1.8.2.
https://www.amxmodx.org/api/string/containi

"containi" returns the position in the string in which the ";" is located, so checking "!= 0" will check if it's found on any position except the first one.

Quote:
;"ModelFile" "Skin1Name" "Skin2Name" "Skin3Name"
Here the ";" is exactly on the first position (0), so your check is doing the opposite thing.
You should check "modelname[0] != ';'" instead or compare "containi" with "-1".
Also don't forget to use "trim" in order to remove any unwanted spaces.
__________________

Last edited by OciXCrom; 07-13-2019 at 13:02.
OciXCrom is offline
Send a message via Skype™ to OciXCrom