Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-24-2012, 07:25 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
GuiScrollCtrl scrollto

Does anyone know why I'd be getting this error:

NPC Code:
Script: Function Map_scroll.scrollto not found in function onTimeout in script of Weapon -System/MiniMap



for using this:

PHP Code:
if (Map_levelimg.zoom 1) {
    
temp.scroll = {int((player.x/((getmapx(this.BRlevel)+1)*64))*(Map_levelimg.width-Map_scroll.width+2)/1.5),int((player.y/((getmapy(this.BRlevel)+1)*64))*(Map_levelimg.height-Map_scroll.height+2)/1.5)};
    
Map_scroll.scrollto(temp.scroll[0],temp.scroll[1]);
  } else if (
Map_levelimg.zoom 1) {
    
temp.scroll2 = {int((player.x/((getmapx(this.BRlevel)+1)*64))*(Map_levelimg.width-Map_scroll.width+2)),int((player.y/((getmapy(this.BRlevel)+1)*64))*(Map_levelimg.height-Map_scroll.height+2))};
    
Map_scroll.scrollto(temp.scroll2[0],temp.scroll2[1]);
  } else {
    
temp.scroll3 = {int((player.x/((getmapx(this.BRlevel)+1)*64))*(Map_levelimg.width-Map_scroll.width+2)),int((player.y/((getmapy(this.BRlevel)+1)*64))*(Map_levelimg.height-Map_scroll.height+2))};
    
Map_scroll.scrollto(temp.scroll3[0],temp.scroll3[1]);
  } 
When it's a function here:
http://www.graal.net/index.php/Creat.../GuiScrollCtrl

Has something changed with scrollto in v6 or something?
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #2  
Old 12-24-2012, 08:00 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Map_scroll probably isn't initialized.
__________________
Quote:
Reply With Quote
  #3  
Old 12-24-2012, 08:35 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
It is. It's in the Gui window which is showing up.

Called from onCreated()
PHP Code:
function CreateMapGUI() {
   new 
GuiControl("MapControl") {
     
useownprofile true;
     
profile.border 0;
     
screenwidth - (MapControl.width);
     
= -10;
     
width 145;
     
height 160;
  
    new 
GuiShowImgCtrl("Map_bgimg") {
      
image thiso.mapbgimg;
      
width getimgwidth(thiso.mapbgimg);
      
height getimgheight(thiso.mapbgimg);
      
horizsizing "right";
      
vertsizing "top";
      
layer 4;
      
0;
      
    }
    new 
GuiScrollCtrl("Map_scroll") {
      
profile GuiBlueScrollProfile;
      
useOwnProfile true;
      
profile.border 1;
      
profile.borderthickness 1;
      
hScrollBar vScrollBar "alwaysOff";
      
horizsizing "right";
      
vertsizing "top";
      
width 118;
      
height 117
      
6;
      
24;
      
      new 
GuiShowImgCtrl("Map_levelimg") {
        
image thiso.mapimg;
        
width getimgwidth(thiso.mapimg);
        
height getimgheight(thiso.mapimg);
        
red blue green 0.95;
        
layer 5;
        
0;
      }
    }
  }

__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #4  
Old 12-26-2012, 11:00 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Don't mean to double post but is there any other reason this would be happening...?
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #5  
Old 12-27-2012, 02:17 AM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Only explanation is that you're calling the function on it before it's been created.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:36 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.