View Single Post
  #1  
Old 10-01-2006, 05:43 PM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
Exceeding the Loop Limit =/

yeah im currently working on this, now i have two problems
a) before the last modification the script gave a error message saying "Out of memory" after you restarted it a few times - had to restart graal to fix this XD
b) after the last modification my pc did freeze up on it, well not really freeze but no more mouse movement, audio, task manager, graal, anything else, hell even numlock toggle took 5-10 seconds to react XD
b 1) it said
Quote:
49
49
147
in the log before it did freeze
anyone know how to fix?

PHP Code:
//#CLIENTSIDE
function onPlayerChats()
  {
  if(
player.chat=="/mapedit")
    {
    if( 
isObjectTileMap ) )
    
TileMap.destroy();
    
this.state "init";
    
this.oi1 this.oi2 0;
    
TileMap = new GuiDrawingPanel();
    
TileMap.makeFirstResponder"false" );
    
GraalControl.makeFirstResponder"true ");
    
this.scrollx=this.scrolly=0;
    
this.mainobj this;
    
this.map = new [ 200 ] [ 200 ];
    
setTimer.05 );
    }
  }
function 
init()
  {
  
this.scrollx this.scrolly 0;
  
withTileMap )
    {
    
0;
    
0;
    
width 200*64;
    
height 200*32;
    
profile "GuiDrawingPanelProfile";
    
clearall();
    
drawimagestretched00widthheight"black.png"001616 );
    new 
GuiWindowCtrlTileMap_TileChooser )
      {
      
0;
      
0;
      
width 200;
      
height 80;
      
profile "GuiBlueWindowProfile";
      
canResize false;
      
canClose false;
      
canMinimize false;
      
canMove true;
      
canMaximize false;
      
canClose closequery true;
      
thiso.catcheventthis"onCloseQuery""closeMapEdit" );
      new 
GuiBitmapButtonCtrlTileMap_TileChooser_Tile1 )
        {
        
15;
        
30;
        
normalbitmap mouseoverbitmap pressedbitmap "gscript_projectigi_desert_tile.png";
        
width 64;
        
height 40;
        
profile "GuiBitmapProfile";
        }
      }
    }
  
GUIContainer.addControlTileMap );
  
TileMap.makeFirstResponder"false" );
  
TileMap_TileChooser.makeFirstResponder"false" );
  
TileMap.clearall();
  
TileMap.visible=false;
  
drawMap();
  }
function 
drawMap()
  {
  
this.hight 0;
  for( 
this.dy 0this.dy <= 200 this.dy++ )
    {
    for( 
this.dx 0this.dx <= 200this.dx++ )
      {
      
this.hight++;
      if( 
this.mapthis.dx  ][ this.dy ] > 0)
        
TileMap.drawImageRectangle( ( this.dx 64 ) + ( 32 * ( this.dy ) ), ( this.dy * ( 16 ) ), "gscript_projectigi_desert_tiles.png"64 * ( this.mapthis.dx ][ this.dy ] - ), 06440);
      if( 
this.hight == 9999 ) break;
      }
      
    if( 
this.hight == 9999 ) break;
    
this.hight++;
    
    }
    echo( 
this.dy);
  if( 
this.dy >= 200 )
    {
    
this.state "init2";
    
TileMap.makeFirstResponder"false" );
    
TileMap_TileChooser.makeFirstResponder"false" );
    
setTimer(.05);
    }
  else
    {
    
scheduleEvent1"drawMapL"this.dxthis.dy );
    }
  }
function 
ondrawMapL()
  {
  echo( 
params[1]);
  
this.hight 0;
  
this.ddx params[0];
  for( 
this.dy params[1]; this.dy <= 200this.dy++ )
    {
    for( 
this.dx thiso.ddxthis.dx <= 200this.dx++ )
      {
      
this.hight++;
      if( 
this.mapthis.dx  ][ this.dy ] > 0)
        
TileMap.drawImageRectangle( ( this.dx 64 ) + ( 32 * ( this.dy ) ), ( this.dy * ( 16 ) ), "gscript_projectigi_desert_tiles.png"64 * ( this.mapthis.dx ][ this.dy ] - ), 06440);      
      if( 
this.hight == 9999 ) break;
      }
    if( 
this.hight == 9999 ) break;
    }
  if( 
this.dy >= 200 )
    {
    
this.state "init2";
    
TileMap.makeFirstResponder"false" );
    
TileMap_TileChooser.makeFirstResponder"false" );
    
setTimer(.05);
    }
  else
    {
    
scheduleEvent1"drawMapL"this.dxthis.dy );
    }
  }
function 
TileMap_TileChooser_Tile1.onAction(){
  
thiso.activetile=1;
}
function 
onTimeout()
  {
  if(
this.state=="init")
    {
    
this.max 9999;
    
this.high 0;
    for(
this.i1=this.oi1;this.i1<=200;this.i1++)
      {
      for(
this.i2=this.oi2;this.i2<=200;this.i2++)
        {
        
this.map[this.i1][this.i2]=int(random(1,3.99));
        
this.high++;
        if( 
this.high == 9999 )
          break;
        }
      if( 
this.high == 9999 
        break;
      
this.high++;
      }
    
this.oi1=this.i1;
    
this.oi2=this.i2;
    if(
this.oi1>=200)
      {
      
this.state="none";
      
init(); 
      }
    
setTimer(.05);
    }
  if(
this.state=="init2")
    {
    
TileMap.visible=true;
    
TileMap.makeFirstResponder"false" );
    
TileMap_TileChooser.makeFirstResponder"false" );
    
GraalControl.makeFirstResponder"true" );
    if(
keydown2(40,false))
      
this.scrolly+=2;
    if(
keydown2(37,false))
      
this.scrollx-=2;
    if(
keydown2(39,false))
      
this.scrollx+=2;
    if(
keydown2(38,false))
      
this.scrolly-=2;
    
TileMap.= -this.scrollx;
    
TileMap.= -this.scrolly;
    
setTimer(.05);
    }
  }
function 
closeMapEdit()
  {
  
TileMap.destroy();
  
this.state "off";
  } 

Last edited by projectigi; 10-01-2006 at 07:12 PM.. Reason: adding
Reply With Quote