Thread: Unique ID
View Single Post
11/14/17, 10:12 AM   #1
gamemodul
Join Date: Nov 2017
Posts: 3
Unique ID

Hello everyone

Is there a specific function to create an unique ID? The ID could be a string, integer or float. Can work with all of that. It just should be unique over time. As far as I've searched the web, LUA doesn't provide a "get unique" function like other languages.

How I'm doing it now:
Code:
a unique ID per day: os.date('D%Y%m%d')
a unique ID over time: string.format('T%s:%s', os.time(), os.rawclock())
Also seen the ESO API functions GetGameTimeMilliseconds() and GetFrameTimeSeconds() but I think it wouldn't make a difference if I don't replace os.rawclock() with it.


Thanks
gamemodul
  Reply With Quote