buddylist

im having trouble deleting a user from a buddylist i got it to add the users but finding a socket in an array is troublesome here is what i have:

if NthField(s,EndOfLine,1)=“bud_off” then
dim i as integer

for i=0 to ssox.Ubound
  if ssox(i).handle=val(NthField(s,endofline,2))+4 then
    ssox.remove i
    dim s2 as string
    dim x as integer
    s2="budz"+endofline
    for x=0 to ssox.Ubound-1
      s2=s2+ssox(x).username+endofline
    next
    for x=0 to ssox.Ubound-1
      ssox(x).write s2
    next
    
  end if
next

end if

you must go through the array in reverse order

...
for i= ssox.Ubound downto 0
...

Or just decrement i after the Remove statement with

i = i - 1

i used this and it worked

if NthField(s,EndOfLine,1)=“bud_off” then
dim i as integer
window1.listbox1.DeleteAllRows
for i=0 to ssox.Ubound
if ssox(i).tag=val(NthField(s,EndOfLine,2)) then
ssox.remove i
dim s2 as string
dim x as integer
s2=“budz”+endofline
for x=0 to ssox.Ubound-1
s2=s2+ssox(x).username+endofline
next
for x=0 to ssox.Ubound-1
ssox(x).write s2
next
end if
next
end if

if NthField(s,

i also needed help with this, im trying to put new text into a textarea

if NthField(s,EndOfLine,1)=“msg” then
textarea1.Text=textarea1.text+ NthField(s,endofline,2)+": "+NthField(s,EndOfLine,3)+endofline
end if

nevermind i got that figured out too

use AppendText

anyone know how to stream a microphone and video?

You might want to start a new thread for your new question… Make sure to do a search of the forums first, to see if the question has already been asked and answered… :slight_smile:

https://forum.xojo.com/44246-streaming-mic-and-video

sorry im new to this forum stuff.

All good… Due to the way I browse the forums, I didn’t see your new thread until after I posted the suggestion… The reason we use new threads for new questions, is the first question someone may not know about so they skip over the thread, but they may be the person that can answer the second question (I’m not that person though, sorry :wink: )