View Single Post
  #1  
Old 01-12-2006, 09:12 PM
Prozac Prozac is offline
one of the good guys
Prozac's Avatar
Join Date: Jan 2006
Posts: 245
Prozac is on a distinguished road
Send a message via AIM to Prozac
code that makes a DLL error in v4

Here is the bulk of (not the entirety as to comply with rules) some code that causes a dll error. Works fine offline, lots of
"Access violation at address 0265B11F in module 'GrallEngine.dll. Read of address 000000D1" windows pop up.

PHP Code:
//#CLIENTSIDE
if (created || playerenters)
  {
  
showsay 0;
  
message;
  
this.angle=0;
  
this.radius=9//radius from player
  
this.speed=.1//rotation speed
  
this.going=1//1=in, 0=out
  
this.newx=30;
  
this.newy=30;
  
this.inc=20;
  
this.nextinc=0;
  
this.hearts=15;
  
this.alive=1;
  
timeout=.07;
}

if (
timeout && this.alive==1)
  {
   
this.shoot1=int(random(0,20));
   if (
this.shoot1==1)
    {
shootball;}
   if (
this.nextinc this.inc)
    {
this.nextinc++;}
    if (
this.inc==this.nextinc)
     {
       
this.nextinc=0
       
move();
     }
    
   if (
x<playerx){x+=.5;}
   if (
x>playerx){x-=.5;}
   if (
y<playery){y+=.5;}
   if (
y>playery){y-=.5;}

  
timeout=.1;
}


if (
wa**** ||  waspelt || wasshot)
  {
  if (
this.hearts>0)
   {
    
this.hearts-=1;  
    
message OWIE!!!; 
    
this.angle=0
    
this.speed+=.1
   }
  if (
this.hearts<=0)
    {
    
//die
    
message NOOOOOO!; sleep 1;
    for (
this.a=0this.a<20this.a++)
      {
      
this.putx1=random(x+3,x-3);
      
this.puty1=random(y+3,y-3);
      
sleep .05;
      
putleaps 3,this.putx1,this.puty1;
    }
    
//regenerate
    
this.alive=0
    
set gotearthboss
    
hide
    
sleep 5
    
this.alive=1
    
this.hearts=7
    
show;
    
this.speed=.1
    
timeout=.7;
  }
}


function 
move()
  {
  if (
this.going==&& this.radius>1){this.radius--;}
  if (
this.going==&& this.radius<60){this.radius++;}
  if (
this.radius==60){this.going=1this.radius--;}
  if (
this.radius==1){this.going=0this.radius++;}
  
message;
  return;
}

function 
boom()
  {
  
this.putx=random(playerx-5,playerx+5);
  
this.puty=random(playery-5,playery+5);
  
hitplayer this.putx,this.puty,playerx,playery;
  
putleaps 3,this.putx,this.puty;
  
putleaps 2,this.putx,this.puty;
  return;

any help would be appreciated ...
Reply With Quote