Why I cant find point in string

The period character is a magic character in string pattern, it just matches anything. Lucky for you, string.find has an optional last parameter that determines if string.find should use string patterns for the second argument. The argument before it is where to start finding, so you’ll need to provide that first.

This leaves you with string.find(tostring(a), ".", 1, true), or if you want, you can escape the period with a percent sign. Which would leave you with string.find(tostring(a), "%.")

4 Likes