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?
it has 2 string returns,
use as name,version = getHubVersion()
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
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)
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
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) ;)