i only know basic in jscript code but i know even less in vbscript code... Shadowfyr sugested me to use this function in vbscript but im not able to translate it to jscript.
can someone help me?
ohh btw... thx again Shadowfyr.
the function is show below.
thx.
------------------------------------------------------------
A binary search in case you don't know basically does this:
Modified by Nick to add [code] and [/code]
------------------------------------------------------------
can someone help me?
ohh btw... thx again Shadowfyr.
the function is show below.
thx.
------------------------------------------------------------
A binary search in case you don't know basically does this:
function find (name)
dim names, walks 'Storing your location names and speed walks.
names = split(world.getvariable("???"),",") 'What ever ones you use.
walks = split(world.getvariable("???"),",")
w
fd = false
st = 0
en = ubound(record)
do until fd or st = en
cr = st + int((en-st)/2)
if names(cr) > name then
en = cr
else if names(cr) < name then
st = cr
else
fd = True
end if
if le = en and lst = st then 'Otherwise it goes forever if no match exists.
exit do
else
lst = st
le = en
end if
loop
if fd then
find = walks(cr)
else
find = "Unknown!" 'Check for this in the calling script (since sending it is pointless.) ;)
end if
end function
Modified by Nick to add [code] and [/code]
------------------------------------------------------------