Error: attempt to perform arithmetic on global xxx (a table value)

  • 1 Replies
  • 1056 Views
Advertisements
Hello, I was trying to alter a script for using manual video mode on my camera so that the three values TV, AV and SV are initialized by the scripting parameter system of CHDK, but I cannot make it work. When I assign the values of the parameter variables to the working variables - which works - I cannot add or substract something from these variables anymore. I get the error "attempt to perform arithmetic on global xxx (a table value)".

Please start the attached script on a camera and then try to change one of the values. After commenting out the lines 311, 312 and 313 the script works again.Why is it?

Thanks for your help!


*

Offline reyalp

  • ******
  • 11082
Re: Error: attempt to perform arithmetic on global xxx (a table value)
« Reply #1 on: 24 / June / 2013, 13:03:11 »
That script does a lot of weird stuff, but one thing I see is that the function menuitem on line 211 use a global named t, so if that gets called before the assignment to tv96, it will end up being a table.
Don't forget what the H stands for.

 

Related Topics