|
|
E1513 in main, but dont see why[solved]
#350439
12/16/10 01:36
12/16/10 01:36
|
Joined: Sep 2010
Posts: 82
peteredlin
OP
Junior Member
|
OP
Junior Member
Joined: Sep 2010
Posts: 82
|
Crash in main function , i cant figure out why.
///////////////////////////////
#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
TerraSame
Senior Member
|
Senior Member
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...
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|