Thread

AW Visual Basic SDK question (Bots)

AW Visual Basic SDK question // Bots

1  |  

blaine

Jan 10, 2002, 2:09am
I want to log my bot i programmed with visual basic sdk into my world in
Dream Land Park, could you tell me what i need to type and an example? i
have no clue what the command would be
thanks.

kah

Jan 10, 2002, 4:03pm
I assume your problem is defining the universe, this is how you do it:
sdk.AwCreate(unihost, uniport)
unihost is a string containing the hostname of the server where the
UniServer runs (example: auth.activeworlds.com for AW), uniport is a long
(number) containing the port on which the UniServer listens (for AW it's 0,
most probably different for DLP).

KAH
PS. if you need a complete project, contact me and I'll send you one of mine
:-))

[View Quote]

brant

Jan 10, 2002, 5:54pm
I thought AW runs on port 5670?

[View Quote]

bowen

Jan 10, 2002, 5:59pm
> I thought AW runs on port 5670?

That's the local port on your computer it listens on, I think.

--Bowen--

foxmccloud

Jan 10, 2002, 6:03pm
when you use 0 as the port, it means "default" which is 5670

Fox Mc Cloud

"brant" <awteen at shoemakervillage.org> a écrit dans le message news: 3c3df18f$1 at server1.Activeworlds.com...
> I thought AW runs on port 5670?
>
[View Quote]

andras

Jan 10, 2002, 6:08pm
AW runs on auth.activeworlds.com server on the 5670 port. OTOH if you omit the URL - the SDK defaults to auth.activeworlds.com and if you omit (supply 0 - which is an illegal port number) the port number, the SDK defaults it to 5670.

<quote>
int aw_create (char* universe_domain, int universe_port, void**
instance)

DESCRIPTION

Creates a bot instance associated with the specified universe server. If you
desire to create several bots, call this multiple times, once for each instance of
the bot.

CALLBACK

None (returns immediately)

NOTES

The universe_domain or universe_port may be specified as 0 to take the
defaults of "auth.activeworlds.com" and 5670 respectively. The pointer to the
instance pointer may also be specified as 0 if it is not desired.

</quote>

Andras


[View Quote]

blaine

Jan 10, 2002, 8:07pm
Thanks
[View Quote]

blaine

Jan 10, 2002, 8:21pm
Im confused as to the use of it
sdk.AwCreate (iphere, porthere)
have the ip and port filled in but it selects it in red and says expected =
after the )
[View Quote]

grimble

Jan 11, 2002, 12:37am
In response to both the points here, the AW SDK help pages state "The
universe_domain or universe_port may be specified as 0 to take the defaults
of "auth.activeworlds.com" and 5670 respectively.". In the VB SDK, you put
"" in the universe_domin parameter rather than a zero.

As far as the error message goes, VB regards a procedure call where the
parameters are enclosed in parentheses as a function and therefore expects a
destination for the return value ... a variable or an expression in a
statement. e.g.

x = ThisFunction (y, z)

ThisFunction (y, z) as a standalone statement is not valid without something
to "soak up" that return value. The same statement without the parenteses,
however, is regarded as a call to a sub and is therefore valid on its own.
e.g.

ThisSub x, y

Since the AwCreate returns a Long representing the return code from the
call, you should really retrieve it with

rc = sdk.AwCreate(hostName, hostPort)

However, if you don't want to check it you can call AwCreate in one of two
other ways:

Call sdk.AwCreate(hostName, hostPort)

or

sdk.AwCreate hostName, hostPort

Hope that helps.

Grims.


[View Quote]

lord fett

Feb 1, 2002, 12:04pm
You will need to make it like this:

rc = sdk.AwCreate(iphere, porthere)

[View Quote]

1  |  
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn