INTL 3:770/1 3:770/3   
   REPLYADDR irfon.ahmad@gmail.com   
   REPLYTO 3:770/3.0 UUCP   
   MSGID: 6af8086b   
   PID: SoupGate-Win32 v1.05   
   I'm attempting to read the optional user fields from an MPL script, but while   
   I have it "working", the way I'm doing it is exceedingly kludgey and there are   
   still issues. It was suggested on Reddit that I might be running into a bug. I   
   wonder if someone    
   can enlighten me.   
      
   So, paring the script down to just the relevant bit, I expected to be able to   
   use something like this:   
      
   Uses User   
   While GetUser(CurrentUser) Do Begin   
    Writeln(UserOpts[1])   
   CurrentUser:= CurrentUser+1   
   End   
       
   In order to display a list of the 2nd optional field for all users. However,   
   no matter what index I put into UserOpts[1], I get fairly muddled results.   
   UserOpts[7] gives me the 2nd user field with the first five characters cut   
   off. Eventually I wound up    
   using this:   
      
    Writeln(copy(striplow(UserOpts[0]),2,length(striplow(UserOpts[0]))-1))   
      
   The reason I went with that is that polling UserOpts[0] reliably included the   
   entire second optional field but with a bunch of garbage ahead of it, and that   
   was my kludgey way of working around that.   
      
   The continuing issues, though: If someone edits their entry for the optional   
   field to something shorter, the data past the end remains. So if that field   
   contained abcdef and I changed it to xyz, then ran the script, for that user   
   it would become xyzdef.    
   If I open users.dat in a hex editor and zero out the offending characters it   
   fixes it, but this is clearly not how I'm supposed to be doing any of this. :)   
      
   Is there another way I should be indexing into the UserOpts array? Or is there   
   a bug in how the script is retrieving the data? Any ideas?   
      
   --- SoupGate-Win32 v1.05   
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)   
   SEEN-BY: 1/123 15/0 90/1 105/81 106/201 114/705 120/340 123/120 131   
   SEEN-BY: 129/305 330 331 153/7715 154/10 218/700 840 220/70 226/17   
   SEEN-BY: 226/30 100 227/114 229/110 111 112 113 206 307 317 400 424   
   SEEN-BY: 229/426 428 452 470 550 664 700 250/5 8 266/512 267/800 282/1038   
   SEEN-BY: 292/854 298/25 305/2 3 317/3 320/219 322/757 342/200 396/45   
   SEEN-BY: 460/58 633/280 712/848 770/1 3 100 340 772/210 220 230   
   PATH: 770/3 1 317/3 229/426   
      
|