elegant and simple hack! thank you!
while you are online, i'd like to ask a bit another question, where i still want to know a type of value.
This is what i want:
I'd like to set an itemIDkey.
I select an item, launch LUA,
if it is a new "clear" item, then set itemIDkey = (max( of all) + 1) ,
if itemIDkey is already defined, then leave it as is.
This is what i have so far:
Code:x = get_folder_items("itemIDkey")
max=table.maxn(x)
m=0
for i=1,max do
m = math.max(m, get_folder_value("itemIDkey",x[i]) )
end
set_folder_value("itemIDkey",get_select_items()[1],m+1)
How can i know if the value is defined without the risk to be thrown out by get_folder_value attempt for undefined value?