Illegal exception trying to draw sprite (SOLVED)

Started by Quintaros, Tue 10/01/2006 23:16:32

Previous topic - Next topic

Quintaros

While experimenting with the rotate sprite function I got the following error message:

Quote
An exception 0xC0000005 occured in ACWIN.EXE at EIP = 0x0043B598 ; program pointer is -42, ACI version 2.71.894, gtags (1,130)

(...)

in Global script (line 76)

The code from this part of the script is:

Code: ags

  DynamicSprite *Plane=DynamicSprite.CreateFromExistingSprite(1);
  Plane.Rotate(angle(0,1));
  RawDrawImage(vectors[0].x, vectors[0].y, Plane.Graphic); // line 76
  Plane.Delete();


If anybody could shed some light on the problem it would be greatly apreciated.  It's been quite a while since I've done any scripting so it may be a pretty obvious problem.

Gilbert

Hmmm, just wild guess would it be possible that either of vectors[0].x or vectors[0].y be a positive or negative number having VERY large magnitude?

Pumaman

What function is that script in? It wouldn't happen to be called from game_start, would it?

If so, remember that no room is loaded when game_start is run, and therefore there is no room background for RawDrawImage to draw onto.

Quintaros

It is called from game start.  Thanks for the explanation.

SMF spam blocked by CleanTalk