[SOLVED]Help with number to string

I am having trouble saving and loading a string. It is a string when its saved but when its read back it becomes a number value and tostring() does not seem to work. I know its got to be simple but I can’t see it.

a = readLocalData("key")
--this returns 5.51491e+06 and I need 5514911

Nevermind, I finally Figured it out.
string.format(“%.0f”,string here)