Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
2 registered members (Grant, AndrewAMD), 911 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Why does this program not work? #270714
06/09/09 14:02
06/09/09 14:02
Joined: Jun 2009
Posts: 148
G
gamingfan101 Offline OP
Member
gamingfan101  Offline OP
Member
G

Joined: Jun 2009
Posts: 148
Im trying to create an image that has my forest background (this image works fine) and my robot in the foreground. But the engine says there is a problem with line 18 (LDDScreenShot1) Thanks!

////////////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>

////////////////////////////////////////////////////////////////////

BMAP* bmforest = "forest.bmp"; // my first bmap

PANEL* first_pan = // my first panel
{
pos_x = 100;
pos_y = 0;
layer = 1;
bmap = bmforest;
flags = OVERLAY | VISIBLE;
}
BMAP* pngRobot = "LDDScreenShot1.PNG"
{
pos_x = 100;
pos_y = 50;
layer = 2;
bmap = pngRobot;
flags = OVERLAY | VISIBLE;
}


/////////////////////////////////////////////////////////////////////

function main()
{
video_mode = 7;
screen_color.green = 75 ;
}


Sorry, im new. I have a tendency to ask really simple questions, so please be patient.
Re: Why does this program not work? [Re: gamingfan101] #270728
06/09/09 15:13
06/09/09 15:13
Joined: Nov 2007
Posts: 1,032
Croatia
croman Offline
Serious User
croman  Offline
Serious User

Joined: Nov 2007
Posts: 1,032
Croatia
you are missing a semicolon
BMAP* pngRobot = "LDDScreenShot1.PNG"
replace with
BMAP* pngRobot = "LDDScreenShot1.PNG";

that's all

Last edited by croman; 06/09/09 15:13.


Ubi bene, ibi Patria.
Re: Why does this program not work? [Re: croman] #270730
06/09/09 15:31
06/09/09 15:31
Joined: Jun 2009
Posts: 148
G
gamingfan101 Offline OP
Member
gamingfan101  Offline OP
Member
G

Joined: Jun 2009
Posts: 148
ok, i added the semicolon, but now it says that the keyword BMAP* is unknown, then it says that bitmap unknown pngRobot.


Sorry, im new. I have a tendency to ask really simple questions, so please be patient.
Re: Why does this program not work? [Re: gamingfan101] #270731
06/09/09 15:34
06/09/09 15:34
Joined: Nov 2007
Posts: 1,032
Croatia
croman Offline
Serious User
croman  Offline
Serious User

Joined: Nov 2007
Posts: 1,032
Croatia
Code:
BMAP* bmforest = "forest.bmp"; // my first bmap

PANEL* first_pan = // my first panel
{
pos_x = 100;
pos_y = 0;
layer = 1;
bmap = bmforest;
flags = OVERLAY | VISIBLE;
}
BMAP* pngRobot = "LDDScreenShot1.png";

PANEL* second_panel =
{
pos_x = 100;
pos_y = 50;
layer = 2;
bmap = pngRobot;
flags = OVERLAY | VISIBLE;
}	



try with this...



Ubi bene, ibi Patria.
Re: Why does this program not work? [Re: croman] #270732
06/09/09 15:44
06/09/09 15:44
Joined: Jun 2009
Posts: 148
G
gamingfan101 Offline OP
Member
gamingfan101  Offline OP
Member
G

Joined: Jun 2009
Posts: 148
Thanks! This one works! Im new to all this so i dont really understand all of this. I just took the code from workshop 04 and used it.


Sorry, im new. I have a tendency to ask really simple questions, so please be patient.
Re: Why does this program not work? [Re: gamingfan101] #270736
06/09/09 15:52
06/09/09 15:52
Joined: Nov 2007
Posts: 1,032
Croatia
croman Offline
Serious User
croman  Offline
Serious User

Joined: Nov 2007
Posts: 1,032
Croatia
ok, just make sure to read through the code twice before posting it here smile look for missing semicolons and wrong syntaxes



Ubi bene, ibi Patria.
Re: Why does this program not work? [Re: croman] #270790
06/09/09 23:17
06/09/09 23:17
Joined: May 2009
Posts: 258
Chicago
J
Jaeger Offline
Member
Jaeger  Offline
Member
J

Joined: May 2009
Posts: 258
Chicago
Also, whenever you hit "Test Run", and the compiler encounters an error, be sure to take note of the line # it gives you. Sometimes it might say there's an error on MAIN LINE 255, but there's no error on #255. But then you'll notice you forgot a semicolon on the line before that, 254. And that makes the compiler think you weren't done with line 254 and that the error is really on 255. I know that might sound tricky, but you'll learn it in no time.

Re: Why does this program not work? [Re: Jaeger] #270792
06/10/09 01:22
06/10/09 01:22
Joined: Jun 2009
Posts: 148
G
gamingfan101 Offline OP
Member
gamingfan101  Offline OP
Member
G

Joined: Jun 2009
Posts: 148
Thanks!


Sorry, im new. I have a tendency to ask really simple questions, so please be patient.

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1