Forums / Developer / Really strange ...
Philippe VINCENT-ROYOL
Thursday 04 November 2010 2:05:02 am
Hi guys,
Never see that and don't know how to fix that: i ve define on template a variable:
{def $nombre1 = 0 }
and i need to change variable value:
{set $nombre1 = inc ( $nombre1 )}
This dont work and i ve this error on debug:
Variable 'Sw:nombre1' doesn't exist, cannot set
What's wrong ? Do i need to get back to sleep? :)
Thanks !
Philippe
Certified Developer (4.1): http://auth.ez.no/certification/verify/272607 Certified Developer (4.4): http://auth.ez.no/certification/verify/377321 G+ : http://plus.tl/dspe Twitter : http://twitter.com/dspe
Ivo Lukac
Thursday 04 November 2010 2:19:00 am
First remove the space between 'inc' and '(':
{set $nombre1 = inc( $nombre1 )}
Is the set in some {section} loop or?
http://www.linkedin.com/in/ivolukac http://www.netgen.hr/eng/blog http://twitter.com/ilukac
Thursday 04 November 2010 2:29:56 am
I remove space same effect...
no {section} loop.. really a basic template code .. thats why i m scared ^^
Thursday 04 November 2010 3:43:04 am
Your log shows that some "Sw" namespace is in the game. Do you have somewhere a "Sw" ?
Thursday 04 November 2010 3:53:22 am
Just find where the problem was..
Because i used a switch structure control with name=$w :
{switch name=$w match=$key}
Damn !
Thursday 04 November 2010 5:17:48 am
"name=$w" is creating namespace, yes