[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem (oh no!)
On Tue, 04 Jan 2000, you wrote:
> >>>>> "Wille" == Wille Huuskonen <vilohidi@mbnet.fi> writes:
>
> Wille> I have no idea why this doesn't work, but I'm angry :-):
> Wille> for(carnum=0;carnum<8;carnum++)
> Wille> for(y=0;y<carsize[carnum*2];y++)
> Wille> for(x=0;x<carsize[carnum*1];x++)
> Wille> car[x+(y*carsize[carnum*1])][carnum]=
> Wille> sprites[x+xoffset+(y+yoffset)*spri\tewidth];
> ^
>
> Wille> It says: invalid operands to binary * So what's the matter?
>
> Seems like you have encountered a sneaking backslash ;-) So:
>
> sprites[x+xoffset+(y+yoffset)*spritewidth];
>
> instead.
>
> /bart
> --
I agree the only other thing I have to add is why are you multiplying anything
by 1? Since the value will end up to be the original value before the
operation, your just wasting cycles.