SA-MP Forums Archive
Check characters - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Check characters (/showthread.php?tid=216959)



Check characters - *IsBack - 26.01.2011

Hello,
How can I check if string contains more than 3 dots?
This is something similar, but I don't know how to make it to count dot symbols:
pawn Код:
new count;
    for (new i = 0, j = strlen(string); i < j; i++)
    {
        switch (string[i])
        {
            //How to count '.' symbols here?
        }
    }



Re: Check characters - Vince - 26.01.2011

pawn Код:
if(string[i] == '.') count++ // notice single quotes