Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-14-2013, 09:20 PM
JohnnyChimpo JohnnyChimpo is offline
Registered User
JohnnyChimpo's Avatar
Join Date: Jun 2004
Posts: 105
JohnnyChimpo is on a distinguished road
setlines CONFUSION

This script isnt working, it is getting to onTabSelect function however just not setting the lines, not understanding why and looking for help yet again.
PHP Code:
this.serverName "server";
this.lngArray = {"de","es","fr","it","ne","no","po","sw"};
this.lngNumber 8;
this.fileArray = {null};
this.prevTab 0;

function 
onActionServerside() {
  
temp.filename null;
  for (
temp.=0;i<lngNumber;++i){
    
temp.filename.add("levels/translations/"@serverName@"_"@lngArray[i]@".po");
  }
  if ( 
params[0] == "loadfile" 
  {
    
this.fileArray.lines ={null};
    for ( 
temp.i=0i<lngNumber;++i){
      
temp.lines loadlines(temp.filename[i]);
      
fileArray.add(temp.lines);
    }
    
player.triggerclient("gui",this.name"loaded"fileArray);
  }
  else if (
params[0] == "save")
  {
    
params[1].savelines(temp.filename0);
    
player.triggerclient("gui",this.name"saved");
  }
  
}

//#CLIENTSIDE
function onActionClientSide() {
  if ( 
params[0] == "loaded")
  {
   
temp.lines params[1];
   
EditTextML.setlines(temp.lines[0]);
  }
  else if ( 
params[0] == "saved")
  {
    
player.chat _("SAVED");
  }
}

...
THERE WAS MORE SCRIPT HERE....
    
    new 
GuiTabCtrl("Trans_Tabs") {
      
profile GuiBlueTabProfile;
      
10;
      
56;
      
width 480;
      
height 24;
      
tabwidth 70;
    
      
clearrows();
      
addrow(0,"Dutch");
      
addrow(1,"Spanish");
      
addrow(2,"French");
      
addrow(3,"Italian");
      
addrow(4,"Nederlands");
      
addrow(5,"Norsk");
      
addrow(6,"Portuges");
      
addrow(7,"Svenska");
      
setSelectedRow(0);
      
thiso.catchevent(Trans_Tabs"onSelect""onTabSelect");
    }  


      new 
GuiMLTextEditCtrl("EditTextML") {
        
profile GuiBlueMLTextEditProfile;
        
10;
        
10;
        
width 480;
        
height 60;
          }
      }
  
....
THERE WAS MORE SCRIPT HERE

//ACTIONS
function onTabSelect(){
  
fileArray[prevTab] = EditTextML.getlines();
  
prevTab Trans_Tabs.getselectedid();
  
EditTextML.setlines(fileArray[prevTab]);

Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 09:19 PM.


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