Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, 1 invisible), 1,395 guests, and 12 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
My script doesn't work even if everything is correct? #250603
02/08/09 23:45
02/08/09 23:45
Joined: Sep 2008
Posts: 76
Max_Prower Offline OP
Junior Member
Max_Prower  Offline OP
Junior Member

Joined: Sep 2008
Posts: 76
Hey, I have a bit of a problem. I made a script for a basic interface (not yet complete) yet when I run it, I get this error.

http://i6.photobucket.com/albums/y237/povraydude/error.jpg

Can someone please help me with this? This is my script so far.

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

function main() // Main function, includes screen resolution and color.

{
video_mode = 7;
screen_colour.blue = 150;
}

function quit game(); // The function that quits the game.

{
while (key_any) {wait(1);}
sys_exit (NULL);
}

//Panels and buttons.

PANEL* background =
{
bmap = "background.bmp";
pos_x = 0;
pos_y = 0;
layer = 1;
flags OVERLAY | VISIBLE
}


Re: My script doesn't work even if everything is correct? [Re: Max_Prower] #250606
02/08/09 23:56
02/08/09 23:56
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
not everything is correct,

first, save your file as a .c file(download the the update, and it will stop saving as wdl.)

second your function:

function quit game(); // The function that quits the game.

{
while (key_any) {wait(1);}
sys_exit (NULL);
}
->f&#305;nction names cant have spaces. fix that, and since this is not a protype, remove the ";" after paranthesis.

last one:
flags OVERLAY | VISIBLE -> you forgot a = and a ; here.

flags = OVERLAY | VISIBLE ;


3333333333
Re: My script doesn't work even if everything is correct? [Re: Quad] #250677
02/09/09 09:48
02/09/09 09:48
Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
Cowabanga Offline
Expert
Cowabanga  Offline
Expert

Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
Code:
screen_colour.blue = 150; // WRONG!

Make it:
Code:
screen_color.blue = 150; // CORRECT!!


and function quit game:
Code:
function quit_game()
{
	while(!key_any) {wait(1);}
	sys_exit(NULL);
}


Re: My script doesn't work even if everything is correct? [Re: Cowabanga] #250725
02/09/09 14:03
02/09/09 14:03
Joined: Sep 2008
Posts: 76
Max_Prower Offline OP
Junior Member
Max_Prower  Offline OP
Junior Member

Joined: Sep 2008
Posts: 76
Edit: Problem solved, for some reason it started working correctly. I don't know what caused it to fritz and say that it had a missing bracket. But if anyone could educate me about such an issue, I would be deeply appreciative. <3

Last edited by Max_Prower; 02/09/09 20:02.

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