mIRC Homepage

UDP Sockets

Posted By: LGBR

UDP Sockets - 22/05/03 01:22 AM

Ok, I have a server in which, when you send a certain UDP string, it will respond with some data for you. So here is the code I wrote to do this:

on *:sockopen:*:{ echo Socket Opened | echo $name $1- }
on *:udpread:*:{ sockread %var | echo %var }

I use the command:
/sockudp -nk hlserv 27015 ˙˙˙˙details

When used, all that happens is "Socket Opened" is echoed. Whats wrong?
Posted By: CloCkWeRX

Re: UDP Sockets - 22/05/03 05:12 AM

Try $sockname, rather than $name. I can't test it coz i have no mIRC atm.

I also, have had problems with UDP - I haven't found a single answer or decent tutorial and gave up. But since its more than just me I'll keep looking into it to see if its just a mIRC thing, a script thing, or we are both retarded.

Posted By: Nimue

Re: UDP Sockets - 22/05/03 06:57 AM

on *:udpread:hlserv:{ sockread -f %var | echo -a %var }
© 2021 mIRC Discussion Forums