Hello I was just woundering why my pixel_x variable was showing up undefined. My code is bellow.
if (Turn == NORTH) //Create colored checker on board
var/C = new /atom/movable/minigame_piece/black(src)
else
var/C = new /atom/movable/minigame_piece/red(src)
C.pixel_x = px
As you can see as can I I define C to be a new atom game_piece. What I can figure is im doing somthing wrong when declaring the C variable too a new atom minigame piece.
Thanks for any help.
ID:268309
Jun 8 2004, 1:26 am
|
|
Actually, you're not. You're just defining a variable, that's called "C". The CORRECT way would be this:
var/atom/movable/minigame_piece/C
if(Turn==NORTH) //Create colored checker on board
C=new/atom/movable/minigame_piece/black(src)
else
C=new/atom/movable/minigame_piece/red(src)
C.pixel_x = px