Problem with getHubVersion() in PtokaX DC Hub 0.3.4.0h1 [debug] May 17 2006 06:3
 

Problem with getHubVersion() in PtokaX DC Hub 0.3.4.0h1 [debug] May 17 2006 06:3

Started by 6Marilyn6Manson6, 17 May, 2006, 15:29:12

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

6Marilyn6Manson6

This is my line:
disp = disp.."	?Hub PtokaX Version:			"..getHubVersion().."\r\n"


and return:
?Hub PtokaX Version:			PtokaX


In Scripting-Interface.txt, I see? ?getHubVersion()            - Return appname and version like name, ver = getHubVersion() -> name = "PtokaX", ver = "0.3.3.1" . Return only name not versione, It is a bug?

GeceBekcisi

Do you need an advanced user handling script? Download UserBekcisi today (Latest Edit)
Features: User + ISP + GeoIP database, user info + share checking and many more...

6Marilyn6Manson6

Yes, I use this:

local name,version = getHubVersion()
disp = disp.."	?Hub Version:\t\t\t"..name.." "..version.."\r\n"


and this solution work. But I read:

getHubVersion()            - Return appname and version like name, ver = getHubVersion() -> name = "PtokaX", ver = "0.3.3.1"

I don't know.... :S

bastya_elvtars

If a function returns more values, then you have to query all return values before the desired one. Assume dummy() returns 5 values, if you only need the 5th, ylou still need to query the first 4, like: _,_,_,myvar=dummy()
(the underscore is a placeholder for variables. :-P)
Everything could have been anything else and it would have just as much meaning.

6Marilyn6Manson6

Quote from: bastya_elvtars on 17 May, 2006, 16:03:03
If a function returns more values, then you have to query all return values before the desired one. Assume dummy() returns 5 values, if you only need the 5th, ylou still need to query the first 4, like: _,_,_,myvar=dummy()
(the underscore is a placeholder for variables. :-P)

Thanks for your explain at me :D

Psycho_Chihuahua

as Ptokax only gives the Version as PtokaX 0.3.4.0 i cheated in the InfoBot Script to add the Subversion String like h0 Lua 5.02 and such

PtxVers = "h0 Lua 5.02"		-- PtokaX Version Substring
	name, ver = getHubVersion()
	"\tHub Version: \t"..name.." "..ver.." "..PtxVers.."\r\n"..
	
shows this way as:
	Hub Version: 	PtokaX 0.3.4.0 h0 Lua 5.02


That way you have the Version Substring as well ;) (well 1 change every update is not that much work) ;)
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

SMF spam blocked by CleanTalk