Gamestudio Links
Zorro Links
Newest Posts
Purchase A8 full licence version
by ukgamer. 04/29/26 18:09
Z9 getting Error 058
by k_ivan. 04/25/26 19:13
ZorroGPT
by TipmyPip. 04/25/26 16:09
Stooq now requires an API key
by jcl. 04/13/26 09:42
Strange "Alien" Skull created with >Knubber<
by NeoDumont. 04/10/26 18:58
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 5,733 guests, and 39 spiders.
Key: Admin, Global Mod, Mod
Newest Members
ukgamer, valino, juergenwue, VladMak, Geir
19210 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Simple Program, Doesn't Work #146809
08/08/07 20:01
08/08/07 20:01
Joined: Jul 2007
Posts: 7
S
SpaceXscape Offline OP
Newbie
SpaceXscape  Offline OP
Newbie
S

Joined: Jul 2007
Posts: 7
I'm creating a simple program that displays a blue screen. Unfortinately all i get is a black screen even though i can screen_color.blue = 150; inside my main() function. Here is the code i'm using:

Code:

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

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

PANEL* panDisplay =
{
flags = VISIBLE;
}

function main()
{
video_switch = 7; // 800 * 600 pixels
screen_color.blue = 150; // dark blue
while (1)
{
wait (1);
}
}



Simple enough right? Any help is appreciated.

Re: Simple Program, Doesn't Work [Re: SpaceXscape] #146810
08/08/07 20:19
08/08/07 20:19
Joined: Jan 2004
Posts: 2,013
The Netherlands
E
Excessus Offline
Expert
Excessus  Offline
Expert
E

Joined: Jan 2004
Posts: 2,013
The Netherlands
I don't know why it compiles, but video_switch is a function, so you may not assign a value to it. If you want to set the screen resolution to 800x600, define video_mode, outside the function:

var video_mode = 7;

and remove the line with video_switch from the function.

Re: Simple Program, Doesn't Work [Re: Excessus] #146811
08/08/07 20:26
08/08/07 20:26
Joined: Jul 2007
Posts: 7
S
SpaceXscape Offline OP
Newbie
SpaceXscape  Offline OP
Newbie
S

Joined: Jul 2007
Posts: 7
Still no progress and i followed all your instructions:

Code:

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

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

var video_mode = 7; // 800 * 600 pixels

PANEL* panDisplay =
{
flags = VISIBLE;
}

function main()
{
screen_color.blue = 150; // dark blue
while (1)
{
wait (1);
}
}



Re: Simple Program, Doesn't Work [Re: SpaceXscape] #146812
08/08/07 20:44
08/08/07 20:44
Joined: Jan 2004
Posts: 2,013
The Netherlands
E
Excessus Offline
Expert
Excessus  Offline
Expert
E

Joined: Jan 2004
Posts: 2,013
The Netherlands
Sorry I was wrong, you should not define video_mode outside the function in Lite-C (that was C-Script). With the following code, I get a blue screen:

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

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

PANEL* panDisplay =
{
flags = VISIBLE;
}

function main()
{
video_mode = 7;
screen_color.blue = 150; // dark blue

while (1)
{
wait (1);
}
}



Re: Simple Program, Doesn't Work [Re: Excessus] #146813
08/08/07 20:48
08/08/07 20:48
Joined: Jul 2007
Posts: 7
S
SpaceXscape Offline OP
Newbie
SpaceXscape  Offline OP
Newbie
S

Joined: Jul 2007
Posts: 7
Still get a black screen and i copied and pasted your code. If i load one of the examples, it works.

Code:

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

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

PANEL* panDisplay =
{
flags = VISIBLE;
}

function main()
{
video_mode = 7;
screen_color.blue = 150; // dark blue

while (1)
{
wait (1);
}
}



Heres a link to a screenshot of what it looks like when i run it. It shows the code on the left and the running app on the right.

screenshot

Re: Simple Program, Doesn't Work [Re: SpaceXscape] #146814
08/08/07 21:17
08/08/07 21:17
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Ensure you have selected the current file for running. You can yuickly do this by pressing alt + f5. The last script you posted should work as expected.


Always learn from history, to be sure you make the same mistakes again...
Re: Simple Program, Doesn't Work [Re: SpaceXscape] #146815
08/08/07 21:17
08/08/07 21:17
Joined: Oct 2006
Posts: 873
S
Shadow969 Offline
User
Shadow969  Offline
User
S

Joined: Oct 2006
Posts: 873
use *.c files for your scripts instead of *.wdl, now wdl is used for defining paths and resources

Re: Simple Program, Doesn't Work [Re: Shadow969] #146816
08/08/07 21:27
08/08/07 21:27
Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
T
TWO Offline

Serious User
TWO  Offline

Serious User
T

Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
you can still use .wdl for c-script Oo

Maybe try level_load("");

Re: Simple Program, Doesn't Work [Re: TWO] #146817
08/08/07 21:44
08/08/07 21:44
Joined: Jul 2007
Posts: 7
S
SpaceXscape Offline OP
Newbie
SpaceXscape  Offline OP
Newbie
S

Joined: Jul 2007
Posts: 7
hes right, resaving the file as Main.c and deleting Main.wdl solved the probem.

Any ideas on where i canfind ball and bat models?

Re: Simple Program, Doesn't Work [Re: SpaceXscape] #146818
08/08/07 21:49
08/08/07 21:49
Joined: Oct 2006
Posts: 873
S
Shadow969 Offline
User
Shadow969  Offline
User
S

Joined: Oct 2006
Posts: 873
try acknex unlimited or user contributions
@TWO in Lite-C you can't

Page 1 of 2 1 2

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

Gamestudio download | 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