You are not logged in.

Dear visitor, welcome to Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.


Thursday, March 21st 2013, 2:50pm

Convert string to number

I'm in a situation where I'm creating a variable (with an existing hotspot name) with the use of txtadd. I'm almost there but the problem I have is that although the name is well formed ("hs16") when I try to use that variable in another function I receive "hsNaN".
I haven't found a way to convert string to number in Krpano, is there any?
Here's part of my code:

Source code

add(imagenActiva,1);txtadd(pname, 'hs', get(imagenActiva));<!-- plugin.registerattribute("pname", "pname"); this did not work-->flyout_by_name(get(pname));



Thursday, March 21st 2013, 8:49pm


when using mathematical actions like add() then the given parameters will be automatically converted to numbers...

Best regards,