|  | 
  
    
      |     |  | Page 1 of 1 | [ 5 posts ] |  |  
    
      |  question about the openlogfile function : Developer's Corner |  |  
    
      | Posted:  December 28th, 2003, 5:51 am |  
                  |  
    
      | 
          
           
            
            |  |  |   
            
            | virusfxp virusfxp's Reps:
 | 
                
                  | logfile = XUscripthost.OpenLogFile("C:chat.log")
 getting a problem stating: value of the 'Scripting.TextStream' connot be converted to String
 
 as far as i understand its supposed to be a string which i have logfile declared to string
 
 also i grabbed this from other plugins and saying not declared but not sure what to declare it as to begin with
 
 vb6.getpath
 
 i assume its getting the path to where the plugin resides since it is used in conjunction with the loading the xml file which resides in the plugin folder
 
 anyone able to ive me any hints about what i need to do for this well. Thanks for any help
 
 edit: to get the pluginpath would i be able to just use Xunleashed.ixuplugin pluginpath to do the same thing?
 
 
 |  |   
            
            |  |  |  |  
    
      | Posted:  December 28th, 2003, 10:40 am |  
                  |  
    
      | 
           
          
           
            
            |  |  |   
            
            | Admin Admin's Reps:
 | 
                
                  | Try using Set logfile = bla bla bla
 Also, there are no declared types in scripting (only variants), so you cannot use
 
 Dim logfile as String
 
 you can ONLY have
 
 Dim logfile
 
 
 Some functions from standard vb are not implemented in vbscript.  (See the vbscript documentation for details)
 
 That is why there is a XUScriptHost.GetXUnleashedDirectory() to get the directory of the xunleashed program.  From there, you can append your other directory information like & "/scripts" etc.
 
 
 
 Are you developing a script or plugin?
 
 
 |  |   
            
            |  |  |  |  
    
      | Posted:  December 28th, 2003, 4:02 pm |  
                  |  
    
      | 
          
           
            
            |  |  |   
            
            | virusfxp virusfxp's Reps:
 | 
                
                  | this is for aplugin.. piecing thigns together and porting a script into a plugin
 i am pretty sure i have the references i need all loaded up as well
 
 i'm using visual studio.net 2003
 
 any ideas on what i may possibly be doing wrong?
 
 
 |  |   
            
            |  |  |  |  
    
      | Posted:  December 28th, 2003, 4:19 pm |  
                  |  
    
      | 
           
          
           
            
            |  |  |   
            
            | WyvernX WyvernX's Reps:
 | 
                
                  | Try declaring logfile NOT as a string, but as 
 Dim logfile as Scripting.TextStream
 
 
 |  |   
            
            |  |  |  |  
    
      | Posted:  December 28th, 2003, 4:31 pm |  
                  |  
    
      | 
          
           
            
            |  |  |   
            
            | virusfxp virusfxp's Reps:
 | 
                
                  | i changed logfile to be an object after noticing something in a reference somewhere and that got rid fo the error for it... so i think i now have everything setup fine for now so gonna try and see if it actually works and such next... then next step is criticism and find out what people want with it so i can try and make it better to use 
 
 |  |   
            
            |  |  |  |  
  
|  Who is online |  |  
    | Users browsing this forum: No registered users and 8 guests |  
 |  |  |