Gamestudio Links
Zorro Links
Newest Posts
zorro license, IB connection
by miwok. 12/06/23 16:32
Newbie Questions
by fairtrader. 12/06/23 11:29
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
6 registered members (miwok, AndrewAMD, TipmyPip, 3run, Quad, 1 invisible), 645 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
E1513 in main, but dont see why[solved] #350439
12/16/10 01:36
12/16/10 01:36
Joined: Sep 2010
Posts: 82
P
peteredlin Offline OP
Junior Member
peteredlin  Offline OP
Junior Member
P

Joined: Sep 2010
Posts: 82
Crash in main function , i cant figure out why.
Code:
///////////////////////////////
#include <acknex.h>
#include <default.c>

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


var a;
var beta;
var alfa;
var gamma;

var fliegwiel_r;
var F_fliegw;
var F_drijfstang;
var drijfstang_l;
var F_zuiger;

var traagheidsmoment;
var fliegwiel_m;
var koppel;
var hoekversnelling;





PANEL* my_panel =
{
	digits(35, 10, "beta = %0.3f", *, 1, beta);
	digits(35, 20, "a = %0.3f", *, 1, a);
	digits(35, 30, "alfa = %0.3f", *, 1, alfa); 
  	digits(35, 40, "gamma = %0.3f", *, 1, gamma);
  	digits(35, 50, "F_drijfstang = %0.3f", *, 1, F_drijfstang);
  	digits(35, 60, "F_fliegw = %0.3f", *, 1, F_fliegw);
  	digits(35, 70, "koppel = %0.3f", *, 1,koppel);
  	digits(35, 80, "traagheidsmoment = %0.3f", *, 1, traagheidsmoment);
  	digits(35, 90, "hoekversnelling = %0.3f", *, 1, hoekversnelling);
  	flags = SHOW | OUTLINE;
}



function F_fliegwiel()
{
	a = sinv(beta) * fliegwiel_r;
	alfa = asinv(a/drijfstang_l);
	gamma = 180 - alfa - beta;
	F_drijfstang = cos(alfa) * F_zuiger;
	F_fliegw = sin(gamma) * F_drijfstang;
	
}

function main()
{
	beta = 45;
	fliegwiel_r = 1;
	drijfstang_l = 1.1;
	F_zuiger = 100;
	fliegwiel_m = 75;	

	traagheidsmoment = 0.5 * fliegwiel_m * pow(fliegwiel_r,2);
	
	
	F_fliegwiel();
	koppel = F_fliegw * fliegwiel_r;
	hoekversnelling = koppel / traagheidsmoment;
	
}



Last edited by peteredlin; 12/18/10 08:20.
Re: E1513 in main, but dont see why [Re: peteredlin] #350444
12/16/10 03:06
12/16/10 03:06
Joined: May 2009
Posts: 439
T
TerraSame Offline
Senior Member
TerraSame  Offline
Senior Member
T

Joined: May 2009
Posts: 439
I also have run into this error...
Most of the time it has been a messed up model...

Try scripting un-nessasary lines out and switch unknown models to other models that you know work...
That way you can narrow down the problem...


On the other hand... according to the manual it says....

"Error E1513: Script crash in...
A function of your script crashed. The usual suspects are accessing an empty pointer, dividing by 0, or trying to do something with a nonexistent object. Crash errors are only indicated in the development engine. The distributable version will not issue an error message, but just try to recover from the error, and if this is not possible, exit the program. The name of the erroneous function is displayed, followed by the 3-character sys_marker, so the error should be easy to find in your script. If you get a crash right at startup or level loading, a damaged sound, image, or model file might be the reason. Another possible reason is a wrong setting of the DEP (Data Execution Prevention) in your Windows system configuration that prevents running scripts."


Good luck...

Re: E1513 in main, but dont see why [Re: TerraSame] #350602
12/17/10 14:47
12/17/10 14:47
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
I've just ran the script you've posted and don't have any crashes.

Other than making sure you've an up-to-date version of the engine I can't think what to suggest


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