From: Robert Klemme Date: 2008-03-12T07:05:45+09:00 Subject: Re: whats the error here? On 11.03.2008 22:45, Adam Akhtar wrote: > My IDE (aptana rails) seems to complain about syntax with this code > > def initialize(size=2) > @size = size > @template = {'1'=> [" # ", "@ @"," # ", "@ @", " # "], > '2'=>[" # ", "@ @"," # ", "@ @", " # "], > '3'=>[" # ", "@ @"," # ", "@ @", " # "], > '4'=>[" # ", "@ @"," # ", "@ @", " # "], > '5'=>[" # ", "@ @"," # ", "@ @", " # "], > '6'=>[" # ", "@ @"," # ", "@ @", " # "], > '7'=>[" # ", "@ @"," # ", "@ @", " # "], > '8'=>[" # ", "@ @"," # ", "@ @", " # "], > '9'=>[" # ", "@ @"," # ", "@ @", " # "], > '0'=>[" # ", "@ @"," # ", "@ @", " # "]} > @numrows = @template[0].length > > end > > def HorizontalBarPrint chr,segment > > lcdchar = @template[chr][segment] #### DOESNT LIKE THIS BIT > > end > > end This bit of code has the alignment wrong and an "end" too much. > Whats wrong with lcdchar = @template[chr][segment] ??? Nothing. > Is it because @template is a class variable and lcdchar is trying to For all that I can see @template is an instance variable. > point to it thus allowing for the possibility of accesing the contents > of the class variable from outside of the class??? All i want to do is > to copy the contents to the variable lcdchar. > > Anyone got any ideas????? Please show the complete code and error message. Cheers robert