Definiert oder vielleicht doch nicht?!

Posted By: Sticky

Definiert oder vielleicht doch nicht?! - 09/15/07 22:30

Hallo zusammen,

ich melde mich mal wieder ^^
Den ganzen Tag lief der folgende Codeschnipsel einwandfrei und seit nun ca. 3 Stunden bekomme ich diese Fehlermeldung wenn ich schiessen möchte. (Vorher lief alles perfekt).
Überall wo "player" davor steht macht er nun Ärger.

Empty Pointer in ´move_bullets: my.pan = player.pan
Empty Pointer in ´move_bullets: my.tilt = player.tilt
Empty Pointer in ´move_bullets: my.roll = player.roll

Code:

function move_bullets()
{
var bullet_speed; // this var will store the speed of the bullet
my.skill30 = 1; // I'm a bullet
my.enable_impact = on; // the bullet is sensitive to impact
my.enable_entity = on; // and to other entities
my.enable_block = on; // as well as to level blocks
my.event = remove_bullets; // when it collides with something, its event function (remove_bullets) will run
my.pan = player.pan; // the bullet has the same pan
my.tilt = player.tilt; // and tilt with the camera
my.roll = player.roll;
bullet_speed.x = 50 * time; // adjust the speed of the bullet here; it will move in the direction given by the camera
bullet_speed.y = 0; // the bullet doesn't move sideways
bullet_speed.z = 0; // or up / down on the z axis
while (my != null) // this loop will run for as long as the bullet exists (it isn't "null")
{
c_move (my, bullet_speed, nullvector, ignore_me); // move the bullet ignoring its creator (the player)
wait (1);
}
}



Es geht um die gelb hervorgehobende Zeile oder eher um "player.pan".
Ich habe hier nichts verändert aber wenn ich versuche zu schiessen dann kommt oben genannte Fehlermeldung.
Ich bin am verzweifeln warum geht es angeblich jetzt auf einmal nicht mehr?
Posted By: rvL_eXile

Re: Definiert oder vielleicht doch nicht?! - 09/15/07 22:43

Dann scheint dein Player nicht Definiert zu sein... Zeig mal mehr vom Code

cYa Sebastian
Posted By: Sticky

Re: Definiert oder vielleicht doch nicht?! - 09/15/07 23:30

*lol* Ich bin sowas von blöd.
Habs hinbekommen, die Lösung lag die ganze Zeit vor
meiner Nase aber vor lauter Verzweiflung übersehen.

Danke :-)

Lg Sticky
© 2024 lite-C Forums