Alright, this is my problem. (i'm using Borland C++ builder 6,windows XP)
I have decleared my variables globaly.
I have made a function that is passed a class and a TImage(both are global).
It compiles, BUT when i click the button, it nukes.
Here is the function code
Here is the function callCode:void move_ship_left(Ship_1 *U_Ship, TImage *U_sprite) { int x1; int y1; //adds to the x,y values x1 = (U_Ship->x1) - 5; y1 = (U_Ship->y1) + 0; //sets up new x,y values U_Ship->x1 =x1; U_Ship->y1 =y1; Form1->Repaint(); Form1->Canvas->Draw(x1,y1,U_sprite->Picture->Graphic ) ; }
here is the variable that's declared globally in another .h fileCode:move_ship_left(User_Ship,Ship_sprite);
Please help me! This is due for a project, and I NEED to fix it!Code:extern Ship_1 *User_Ship; extern TImage *Ship_sprite;![]()
thx for the help![]()



LinkBack URL
About LinkBacks




