Gamestudio Links
Zorro Links
Newest Posts
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
400 free seamless texture pack downl. here !
by NeoDumont. 04/08/26 19:55
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (AndrewAMD), 3,675 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
valino, juergenwue, VladMak, Geir, ondrej
19209 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Engine Script Crashes #243272
12/29/08 04:52
12/29/08 04:52
Joined: Jan 2008
Posts: 1,580
Blade280891 Offline OP
Serious User
Blade280891  Offline OP
Serious User

Joined: Jan 2008
Posts: 1,580
I get no errors and nothing in the acklog,

Acklog
Quote:
Log of A7 Engine 7.60 run at Mon Dec 29 04:56:08 2008
Emo on Windows NT/2000/XP version 6.0 Build 6001
Options main.c -nx 30 -diag

App C:\Program Files\GStudio7\acknex.exe in C:\Users\Dean\Downloads\Desktop\Games\Castle Defense\
MM mixer opened
DSOUND device opened
DI interface opened
Start Window opened
(c)Conitec . Dieburg . San Diego . www.3dgamestudio.com
A7 Engine - Extra Edition V7.60 - Nov 18 2008
Development version
Registered to: Dean Whitehouse

Mouse found
Speakers (Realtek High Definition Audio) opened
ATI RADEON XPRESS 200M Series pure T&L device 1ff9 detected
D3D device ATI RADEON XPRESS 200M Series 1ff9 selected.
PATH C:\Program Files\GStudio7\code\
ackwii.dll opened
t7.dll opened
Compiling MAIN.C - [Esc] to abort..... ....


Then it crashes :s

My code
Code:
#include <acknex.h>
#include <default.c>
#include <levels.c>

//Prototyping

	//Functions
	function startpoint();
	function endpoint();
	
	//Actions
	function enemy_start_point();
	function enemy_end_point();
	
	//Variables 
	var current_level = 1;
	var current_score = 0;
	var current_lives = 25;
	var soldiers = 50;

	
	//Entitys 
	ENTITY* start_point;
	ENTITY* end_point;
	
	//Strings
	STRING* someStr = "#20";
	STRING* bottom_info_desc = "#20";
	STRING* bottom_info_title = "#20";
	STRING* bottom_info_defend = current_lives;

	//Text
	TEXT* someTxt =
	{
		pos_x = 10;
		pos_y = 10;
	   font = arial;
	   string (someStr);
	   flags = VISIBLE;
	}
	
	TEXT* bottom_info =
	{
		pos_x = 10;
		pos_y = 420;
	   font = arial;
	   string (bottom_info_desc);
	   flags = VISIBLE;
	}

	TEXT* bottom_info_top =
	{
		pos_x = 10;
		pos_y = 400;
	   font = arial;
	   string (bottom_info_title);
	   flags = VISIBLE;
	}
	
	TEXT* bottom_info_defence =
	{
		pos_x = 10;
		pos_y = 430;
	   font = arial;
	   string (bottom_info_defend);
	   flags = VISIBLE;
	}
	
	//Panels
	PANEL* panDisplay =
	{
		digits(10, 10, "Defenders: %0.f", *, 1, current_lives);
		digits(10, 30, "Score: %0.f", *, 1, current_score);
		digits(250, 10, "Enemys Remaining: %0.f", *, 1, enemys);
		digits(500, 10, "Seconds Passed: %0.f", *, 1, seconds);
		digits(10, 20, "Soldiers Remaining: %0.f", *, 1, soldiers);
		flags = VISIBLE;
	}


function level_select()
{
	if(current_level == 1)
	{
		level_1_init();
	}	
}

function main()
{
	level_select();
	mouse_mode = 4;
	mouse_range = 50000;
	while(1)
	{
		mouse_pos.x = mouse_cursor.x;
	  	mouse_pos.y = mouse_cursor.y;
		wait(1);
	}
}

action enemy_start_point()
{
	start_point = me;
	my.emask |= ENABLE_TOUCH | ENABLE_RELEASE | ENABLE_CLICK;
	my.event = startpoint;
	
}

action enemy_end_point()
{
	end_point = me;
	my.emask |= ENABLE_TOUCH | ENABLE_RELEASE | ENABLE_CLICK;
	my.event = endpoint;
}


function startpoint()
{
	if(event_type == EVENT_TOUCH)
	{
		my.ambient = 200;
		my.lightrange = 100;
		my.red = 70;
		my.blue = 0;
		my.green = 0;
	}
	if(event_type == EVENT_RELEASE)
	{
		my.ambient = 0;
		my.lightrange = 0;
	}
}

function endpoint()
{
	if(event_type == EVENT_TOUCH)
	{
		someTxt.pos_x = 260;
		someTxt.pos_y = 25;
		str_cpy(someStr, "Fort"); 
		my.ambient = 200;
		my.lightrange = 100;
	}
	if(event_type == EVENT_RELEASE)
	{
		str_cpy(someStr, "#20");
		my.ambient = 0;
		my.lightrange = 0;
	}
	if(event_type == EVENT_CLICK)
	{
		str_cpy(bottom_info_title, "Fort"); 
		str_cpy(bottom_info_desc, "This is your home you must protect it and it's people from attackers.");
		str_cat(bottom_info_defend,"Defenders Left");
 	}
}


The script, levels.c is in the same folder, but when i add the script main.c to the level it says cannot open levels.c.

This is levels.c
Code:
STRING* level_title = "#20";
var enemys = 0;
var seconds = 0;
//int time_passed = "";
FONT* Arial = "Arial#20b";

	/*function convert_to_time(time)
	{
		STRING* formatted_string = "";
		
		if(time < 60)
		{
			str_for_num(formatted_string,time);
			STRING* time_gone = str_cat("00:",formatted_string);	
			return time_gone;
		}	
		
		if(time >= 60 && time < 3600)
		{
			var secs = time%60;
			var mins = time / 60;
			
			STRING*minutes;
			STRING*second;
			
			str_for_num(minutes,mins);
			str_for_num(second,secs);
						
			if(mins < 10)
			{
				minutes = str_cat(0,mins);
			}

			minutes = str_cat(minutes,":");

			formatted_string = str_cat(minutes,second);

			return formatted_string;
		}
	}*/
	
	
TEXT* level_welcome =
{
	pos_x = 170;
	pos_y = 230;
	font = Arial;
	string(level_title);
	flags = VISIBLE;
}

function level_1_init()
{
	level_load("level1.wmb");
	wait(1);
	camera.x = 0;
	camera.y = 0;
	camera.z = 863;
	camera.tilt = -90;
	camera.pan = 180;
	camera.roll = 0;
	str_cpy(level_title, "Level 1 - Stop the enemy reaching the castle"); 
	freeze_mode	= 1;
	wait(-5);
	str_cpy(level_title,"Level Start");
	level_welcome.pos_x = 250;
	wait(-2);
	enemys = 15;
	freeze_mode	= 0;
	str_cpy(level_title,"#20");
	while(1)
	{
		wait(-1);
		seconds += 1;
	}
}


Any ideas?

Last edited by Blade28081991; 12/29/08 05:07.

My Avatar Randomness V2

"Someone get me to the doctor, and someone call the nurse
And someone buy me roses, and someone burned the church"
Re: Engine Script Crashes [Re: Blade280891] #243274
12/29/08 06:03
12/29/08 06:03
Joined: Aug 2008
Posts: 218
U.S.
GamerX Offline
Member
GamerX  Offline
Member

Joined: Aug 2008
Posts: 218
U.S.
does it say anything or does it just shut down.

Last edited by GamerX; 12/29/08 06:20.

"You may never know what results come of your action, but if you do nothing there will be no result."
-Mahatma Gandhi
Re: Engine Script Crashes [Re: GamerX] #243277
12/29/08 08:06
12/29/08 08:06
Joined: Oct 2004
Posts: 1,655
T
testDummy Offline
Serious User
testDummy  Offline
Serious User
T

Joined: Oct 2004
Posts: 1,655
0.5 sec scan 1st find = string pointer assigned to var
STRING* bottom_info_defend = current_lives

Re: Engine Script Crashes [Re: testDummy] #243325
12/29/08 14:32
12/29/08 14:32
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
I dont like the look of the main.c line
#include <levels.c>
change it to
#include "levels.c"
and see how it goes.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Engine Script Crashes [Re: EvilSOB] #243343
12/29/08 16:14
12/29/08 16:14
Joined: Jan 2008
Posts: 1,580
Blade280891 Offline OP
Serious User
Blade280891  Offline OP
Serious User

Joined: Jan 2008
Posts: 1,580
Thanks testDummy, i wouldn't of thought that would matter :s.


My Avatar Randomness V2

"Someone get me to the doctor, and someone call the nurse
And someone buy me roses, and someone burned the church"

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