Page 1 of 1

[fixed] Proper var name for color anim in Sprites (color_)

PostPosted: Friday, 20.September 2013, 07:44
by Skinnytorus
I have just remembered we had this problem: viewtopic.php?f=41&t=1068
IMHO, the variable should be called Color and not "color_" or be given some meaningful name exactly corresponding to the param marked with "*".
I don't know which ops other than Sprites have this problem, but there might be similar cases. I can investigate a little ;)
Of course, this will break compatibility, but we've already stepped on that way...

Re: Proper var name for color anim in Sprites (color_)

PostPosted: Saturday, 21.September 2013, 07:21
by ikam
It's because this var name is a reserved keyword, so it change it at compil to avoid conflict...
here are all concerned name :

Code: Select all
  if(buffer==L"int") buffer = L"int_";
  if(buffer==L"float") buffer = L"float_";
  if(buffer==L"color") buffer = L"color_";
  if(buffer==L"string") buffer = L"string_";
  // may be add more keywords...


need to find a solution...

Re: Proper var name for color anim in Sprites (color_)

PostPosted: Saturday, 21.September 2013, 07:50
by Skinnytorus
Maybe rename color anim variable in Sprites (and other ops with animated Color) to "Colors"?
The others do not seem to be used elsewhere in anim scripts as animatable params.

Re: Proper var name for color anim in Sprites (color_)

PostPosted: Saturday, 21.September 2013, 12:28
by ikam
ok it is done. renamed to colors
all impacted op :
-modslice
-print
-sprites
-layer2d
-SSAo

Re: Proper var name for color anim in Sprites (color_)

PostPosted: Saturday, 21.September 2013, 13:02
by Skinnytorus
Works like a charm! Thanks a whole lot! \:D/