Gamestudio Links
Zorro Links
Newest Posts
WFO Training with parallel cores Zorro64
by Martin_HH. 02/23/26 10:49
ZorroGPT
by TipmyPip. 02/21/26 19:15
Camera always moves upwards?
by clonman. 02/21/26 09:29
Zorro version 3.0 prerelease!
by TipmyPip. 02/20/26 13:22
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (MonsterX, Martin_HH, TipmyPip), 6,282 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Fatal Engine Error E 1513 when hitting mdl #7647
12/16/01 01:53
12/16/01 01:53

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



Hi all,
I asked this in the beginners forum but noone could help me, so I posted it here.
I´m using this code to shoot at a box.mdl:

function spieler_schiesst() {
temp.X = 5000;
temp.Y = 0;
temp.Z = 0;
VEC_ROTATE (temp, CAMERA.PAN);
VEC_ADD (temp, CAMERA.X);
TRACE_MODE = IGNORE_ME + IGNORE_SPRITES + ACTIVATE_SHOOT;
TRACE (CAMERA.X, temp);
}


with the box having the following script:

action testbox {
my.frame = 1;
my.scale_x = 0.5;
my.scale_y = 0.5;
my.scale_z = 0.5;
my.enable_shoot = on;
my.event = testbox_event();
}


function testbox_event {
my.pan += 45;

}

The result:

Fatal Engine Error E 1513
WDL-Crash in spieler_schiesst

It works with and without the box in the level, the error only occurs when I shoot at the box and hit it.

The errormessage says "Fatal Engine error E1513" in the titel bar. The messagetext itself is:"WDL-Crash in spieler_schiesst"

What am I doing wrong???


Re: Fatal Engine Error E 1513 when hitting mdl #7648
12/16/01 03:01
12/16/01 03:01

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



most probably i feel its because of retriggering
of the event action infinitely and so just try
adding a WAIT 1; in the begining of the event action of the box.
hope that helps

Re: Fatal Engine Error E 1513 when hitting mdl #7649
12/17/01 11:04
12/17/01 11:04

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



I think we have some classic bracket problems
here.

In the "my.event = testbox_event();" line,
delete the "()". What you want to do on this
line is set "my.event" to the *pointer* (or
name) of the event function. But, by including
the "()" you force testbox_event to execute itself, returning a nonsense value (since
testbox_event doesn't have a reurn statement),
which gets stored as the function to execute when
an event occurs. Of course, there's no function
at that address/value, so the engine bombs.

I also think you need a "()" in the "function
testbox_event" line.

I hope this is some help in resolving your problem.

Coda.


Re: Fatal Engine Error E 1513 when hitting mdl #7650
12/19/01 00:11
12/19/01 00:11
Joined: Jul 2000
Posts: 1,570
Windsor, CT 06095
W
WildCat Offline
Expert
WildCat  Offline
Expert
W

Joined: Jul 2000
Posts: 1,570
Windsor, CT 06095
Coda,

Thanks for that reply. I usually get it right, but when it doesn't work, I resort to trial and error because I did not understand what the () means.

I'm better now.

Thanks again.

-WildCat



Visit us at [url=http://www.vertexgames.com]Vertex Games[/url]!
Re: Fatal Engine Error E 1513 when hitting mdl #7651
12/20/01 06:29
12/20/01 06:29

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



Coda: I removed the () from the my.event line but the result is an error message: parameter unknown:testbox_event

changing function testbox_event into function testbox_event() didn´t do anything.

zazang: the wait 1; didn´t change anything either

Thanks a lot for your help guys, but that was not it. Maybe somebody can post a working code snippet, so I can compare it to mine....


Re: Fatal Engine Error E 1513 when hitting mdl #7652
12/20/01 07:58
12/20/01 07:58

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



Not sure if it is a problem in the newer versions but seems like some of the older versions required you to either put the event function before associating it with an action or using the command "SET" :

//using SET MY.EVENT

action testbox {
my.frame = 1;
my.scale_x = 0.5;
my.scale_y = 0.5;
my.scale_z = 0.5;
my.enable_shoot = on;
SET my.event, testbox_event;
}


function testbox_event {
my.pan += 45;

}
///////////

or:

//using MY.EVENT before the ACTION

function testbox_event {
my.pan += 45;

}

action testbox {
my.frame = 1;
my.scale_x = 0.5;
my.scale_y = 0.5;
my.scale_z = 0.5;
my.enable_shoot = on;
my.event = testbox_event;
}


Re: Fatal Engine Error E 1513 when hitting mdl #7653
12/20/01 11:18
12/20/01 11:18

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



I think (hope? ) that Keebo has hit it on the
head: keep my suggested changes, AND move the
definition of the event function up before
the "my.event = " line.

A suggestion for anyone who's interested: newer
versions of A5 allow you to use "function prototypes" to, in effect, say "hey, here's a
function that I haven't defined yet, but I will
later on so its OK for you to reference it now".
If you create a prototype for EVERY function you
write, and if you store them in one big wdl file
that you include BEFORE all others, you'll find
that you no longer have to worry about the order
of function definitions in your code.

In fact, I've taken the above idea one step further.
(C programmers will recognise this instantly. ).
Say I'm writing some wdl code about movement. I
put EVERY variable declaration and EVERY function
prototype into a "move_h.wdl" file. My "move.wdl"
file then just consists of action/function definitions.
The advantage of this approach is that, provided
you include all your "????_h.wdl" files first,
you don't have to remember anything else about the
order in which you include files. All the variables
are declared, all functions are prototyped before
any of them are referenced.

Merry Christmas All,
Coda


Re: Fatal Engine Error E 1513 when hitting mdl #7654
12/22/01 08:06
12/22/01 08:06

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



I´ll try this when I get home from work tonight and then tell you what happened.

Re: Fatal Engine Error E 1513 when hitting mdl #7655
12/22/01 04:51
12/22/01 04:51

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



OK, I did some tests:

1)keebo: //using MY.EVENT before the ACTION
no result, no change

2) keebo://using SET MY.EVENT
result: unknown SETmy keyword

3) Coda: I kept the changes as far as they didn´t create an error (removing "()" from my.event line)


Somehow I´m glad it was not the simplest newbie-error but on the other hand I didn´t get anywhere yet. Still thanx to all who tried and keep on going with your ideas! It doesn´t really make sense to keep on working on an FPS with an errormessage everytime you hit a NPC.


Re: Fatal Engine Error E 1513 when hitting mdl #7656
12/22/01 04:53
12/22/01 04:53

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



I forgot:
I´m using 5.12 commercial on a Win98 AMD900 with 384mb RAM and a GForce 2.

Page 1 of 2 1 2

Moderated by  HeelX, Spirit 

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