Learning strchar ???
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

Learning strchar ???

Started by NightLitch, 30 January, 2004, 14:26:09

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

NightLitch

this is what I have read:

QuoteAny client with a DC++ tag that sends anything other than strchar( 1 ) is modded. Clients that i know of that do this are:  

know how do I call strchar ??

this is my test code

function NewUserConnected(curUser)
	if strfind(curUser.sMyInfoString,"<++") then
		SendToAll("CLIENT ++")
		if curUser.sMyInfoString == strchar(1) then
			SendToAll("CLIENT OK")
		else
			SendToAll("CLIENT NOT")
		end
	else
		SendToAll("CLIENT ??")
	end
end

plz help me understand a thing or 2.
//NL

NightLitch

plz brains... how does it work... Am a noob on gsub and strlen & strsub to so plz help me a little here...

strchar (i1, i2, ...)
Receives 0 or more integers. Returns a string with length equal to the number of arguments, wherein each character has the internal numerical code equal to its correspondent argument.
Numerical codes are not necessarily portable across platforms.
//NL

kepp

I can tell you this though

LENGTH = "0123456789"
p = strlen(LENGTH)
print(p)

It will print the length, so the output of this became "10"
Guarding    

NightLitch

Thx m8. that will come in handy. Gonna try it later...

*Finally Viking* hehe
//NL

kepp

About gsub, play with it :P

To see what results you get

Click Here
And try diferent things there :D
Guarding    

tezlo

uhmm.. you need to read the $MyINFO part here

especially..
is a string describing the client's internet connection selected from "56Kbps", "Satellite", "DSL", "Cable", "LAN(T1)", and "LAN(T3)" followed by a byte indicating the speed class. The value of the byte is selected from at least 1 for 56Kbps, 3 for cable or DSL, or 7, also for DSL.

that BYTE should have ordinal value of 1

//www.asciitable.com

SMF spam blocked by CleanTalk