Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Left side of assignment operator must be variable or property.

Status
Not open for further replies.

mancroft

Programmer
Oct 26, 2002
267
GB
ERROR MESSAGE:
Left side of assignment operator must be variable or property.

THE CODE below produces THE ERRORS (also below).

Any ideas how to rectify, please?

THE CODE:

counter = 1;
eval (("picslot" + counter) + ".picnumber") = eval ("_level0.picnumber" + counter);
eval (("picslot" + counter) + ".picdescription") = eval ("_level0.picdescription" + counter);
ycounter = -125;
counter = counter + 1;
if (counter < _level0.piccounter) {
do {
duplicateMovieClip (&quot;picslot1&quot;, &quot;picslot&quot; + counter, counter);
setProperty(&quot;picslot&quot; + counter, _y , ycounter);
eval ((&quot;picslot&quot; + counter) + &quot;.picnumber&quot;) = eval (&quot;_level0.picnumber&quot; + counter);
eval ((&quot;picslot&quot; + counter) + &quot;.picdescription&quot;) = eval (&quot;_level0.picdescription&quot; + counter);
ycounter = ycounter + 80;
counter = counter + 1;
} while (counter < _level0.piccounter);
}
_root.picturelist.refreshPane();


PRODUCES THE ERRORS:

Symbol=Symbol 12clip, Layer=Layer 3, Frame=5: Line 2: Left side of assignment operator must be variable or property.
eval ((&quot;picslot&quot; + counter) + &quot;.picnumber&quot;) = eval (&quot;_level0.picnumber&quot; + counter);

Symbol=Symbol 12clip, Layer=Layer 3, Frame=5: Line 3: Left side of assignment operator must be variable or property.
eval ((&quot;picslot&quot; + counter) + &quot;.picdescription&quot;) = eval (&quot;_level0.picdescription&quot; + counter);

Symbol=Symbol 12clip, Layer=Layer 3, Frame=5: Line 10: Left side of assignment operator must be variable or property.
eval ((&quot;picslot&quot; + counter) + &quot;.picnumber&quot;) = eval (&quot;_level0.picnumber&quot; + counter);

Symbol=Symbol 12clip, Layer=Layer 3, Frame=5: Line 11: Left side of assignment operator must be variable or property.
eval ((&quot;picslot&quot; + counter) + &quot;.picdescription&quot;) = eval (&quot;_level0.picdescription&quot; + counter);

 
Don't use eval, but associative array syntax...

Regards,

cubalibre2.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top