Problem with the program (Framework thingy) at lesson 5

The Partridge Family were neither partridges nor a family. Discuss.
CreZZe
Posts: 28
Joined: February 26th, 2013, 3:57 pm

Problem with the program (Framework thingy) at lesson 5

Post by CreZZe » May 6th, 2013, 6:05 pm

Im at lesson number 5.
My program (Framework) crashes everytime i start to use it...
I had it up for a couple of minutes, worked fine but when i wrote around 10-20 characters, it crashed!!!
I've restarted it like 10 times. Always crashes when i write like 10-20 characters.
Does anyone have the same problem or anyone that can solve it?

PS:Sry for not fluent english!

thefatshizms
Posts: 8
Joined: May 5th, 2013, 3:00 pm

Re: Problem with the program (Framework thingy) at lesson 5

Post by thefatshizms » May 6th, 2013, 9:08 pm

Show your code, that's what's causing the crash. Closing the program does nothing as the compiler is looking at your code, not your IDE.

CreZZe
Posts: 28
Joined: February 26th, 2013, 3:57 pm

Re: Problem with the program (Framework thingy) at lesson 5

Post by CreZZe » May 7th, 2013, 5:43 am

Game::Game( HWND hWnd,const KeyboardServer& kServer )
: gfx ( hWnd ),
kbd( kServer )
{}

void Game::Go()
{
gfx.BeginFrame();
ComposeFrame();
gfx.EndFrame();
}

void Game::ComposeFrame()
{
int x;
int y;
int gb;
int f;
x = 400;
y = 300;
gb = 255;
f = 255;

if( kbd.RightIsPressed() )
{
x = 500;
}

if( kbd.LeftIsPressed() )
{
x = 300;
}

if( kbd.UpIsPressed() )
{
y = 200;
}

if( kbd.DownIsPressed() )
{
y = 400;
}

if( kbd.EnterIsPressed() )
{
f = 0;
}

if( kbd.SpaceIsPressed() )
{
gb = 0;
}

gfx.PutPixel( x, y,255,gb,f );
gfx.PutPixel( -5 + x, y,255,gb,f );
gfx.PutPixel( -4 + x, y,255,gb,f );
gfx.PutPixel( -3 + x, y,255,gb,f );
gfx.PutPixel( 3 + x, y,255,gb,f );
gfx.PutPixel( 4 + x, y,255,gb,f );
gfx.PutPixel( 5 + x, y,255,gb,f );
gfx.PutPixel( x,-5 + y,255,gb,f );
gfx.PutPixel( x,-4 + y,255,gb,f );
gfx.PutPixel( x,-3 + y,255,gb,f );
gfx.PutPixel( x, 3 + y,255,gb,f );
gfx.PutPixel( x, 4 + y,255,gb,f );
gfx.PutPixel( x, 5 + y,255,gb,f );
}

Im trying to follow lesson number 5 but it just crashes when im changing "Rightispressed x = 500;" too "Rightispressed x = x + 1;"
Have crashed when i wrote a new "int" too.

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: Problem with the program (Framework thingy) at lesson 5

Post by LuX » May 8th, 2013, 2:01 pm

Is your computer old? Try using the ghillie build version of the framework. You can find it at the material download page.
ʕ •ᴥ•ʔ

CreZZe
Posts: 28
Joined: February 26th, 2013, 3:57 pm

Re: Problem with the program (Framework thingy) at lesson 5

Post by CreZZe » May 8th, 2013, 2:36 pm

This is the problem - http://piclair.com/ua8cr
Translation from Swedish to English - Microsoft Visual C++ 2010 Express have stopped working
Windows is searching for the problem...

CreZZe
Posts: 28
Joined: February 26th, 2013, 3:57 pm

Re: Problem with the program (Framework thingy) at lesson 5

Post by CreZZe » May 8th, 2013, 4:17 pm

My computer is a "Acer predator" cant the exact numbers. One year old. Ghilie didnt work. Crashed...

Conflictus
Posts: 53
Joined: January 7th, 2013, 8:09 am

Re: Problem with the program (Framework thingy) at lesson 5

Post by Conflictus » May 9th, 2013, 6:21 pm

Do you happen to use any screen reader software? Do you have a touch screen display?

Probably a long shot, but figured i'd ask anyways.

CreZZe
Posts: 28
Joined: February 26th, 2013, 3:57 pm

Re: Problem with the program (Framework thingy) at lesson 5

Post by CreZZe » May 11th, 2013, 5:03 pm

My screen isnt a touch screen if it was that you wondered.

User avatar
DreamBliss
Posts: 30
Joined: March 27th, 2013, 11:48 pm
Location: Lost on the Way
Contact:

Re: Problem with the program (Framework thingy) at lesson 5

Post by DreamBliss » May 16th, 2013, 1:51 am

What operating system are you using?
You create reality in your mind,
Before experiencing it as reality,
So if you want to change something,
First change what you think about it.

CreZZe
Posts: 28
Joined: February 26th, 2013, 3:57 pm

Re: Problem with the program (Framework thingy) at lesson 5

Post by CreZZe » May 16th, 2013, 1:33 pm

Operating system - Windows 7

Post Reply