AW Visual Basic SDK question (Bots)

AW Visual Basic SDK question // Bots

1  |  


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


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: 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).

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

[View Quote]


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

[View Quote]


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.



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

Fox Mc Cloud

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


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

int aw_create (char* universe_domain, int universe_port, void**


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.


None (returns immediately)


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



[View Quote]


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


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]


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 "" 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.

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)


sdk.AwCreate hostName, hostPort

Hope that helps.


[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  | is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn