----- Original Message ----- From: "Johan Persson" <tokikenshi / anime-genesis.com> > There's a problem I've been fighting since last week. Check this piece > of code out and tell me what's wrong: > > # snip > @curLen.downto(1) do |i| > @snake[i].x = @snake[i - 1].x > @snake[i].y = @snake[i - 1].y > end > # snip > > @curLen is an integer with the value 20 and @snake is an array > containing structures for defining coordinates. The snippet above is a > part in a snake-clone where the element 0 in array @snake is the head > which is feeded with new values each cycle. This piece of code > controls the flow of coordinates for each point of the snake. > Every time I run this code Ruby dies with no message at all. > Help, please! > > -Johan Persson I can't see anything wrong with your code, and I doubt anybody else will either. For somebody to find "the problem", you'll need to post enough code that: - can be run - gives rise to the error you're talking about That code should be a minimum. So you need some rudimentary definitions for @snake and @curlen. Cheers, Gavin