ThreadBoard ArchivesSite FeaturesActiveworlds SupportHistoric Archives |
Visual Basic SDK question (Sdk)
Visual Basic SDK question // SdkblaineJan 10, 2002, 12:56am
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? thanks. baronJan 10, 2002, 5:30am
AwCreate (domain As String, port As Long) As Long
http://www.grimmsoft.com/help/index.php?parent=1&item=22&expand=2| http://www.activeworlds.com/sdk/aw_create.htm [View Quote] blaineJan 10, 2002, 8:24pm
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] joemanJan 10, 2002, 9:11pm
sdk.awcreate iphere, porthere ... Dont do sdk.AwCreate(blah) unless you
want to get the error code off of it, if there is even one... -Joe [View Quote] baronJan 10, 2002, 9:24pm
There are 3 ways to call AwCreate in VB (applies to all functions)
Dim rc As Long rc = sdk.AwCreate(UnivHost, UnivPort) If rc Then MsgBox "Unable to create a bot (reason " & rc & ")" or sdk.AwCreate UnivHost, UnivPort or Call sdk.AwCreate(UnivHost, UnivPort) [View Quote] foxmccloudJan 10, 2002, 9:37pm
I knew VB syntax was weird, but not THAT much lol
Fox Mc Cloud "baron" <pk39srt at hotmail.com> a écrit dans le message news: 3c3e229e at server1.Activeworlds.com... > There are 3 ways to call AwCreate in VB (applies to all functions) > > Dim rc As Long > rc = sdk.AwCreate(UnivHost, UnivPort) > If rc Then MsgBox "Unable to create a bot (reason " & rc & ")" > > or > > sdk.AwCreate UnivHost, UnivPort > > or > > Call sdk.AwCreate(UnivHost, UnivPort) blaineJan 10, 2002, 9:52pm
Private Sub cmdlogin_Click()
On Error GoTo Err sdk.AwInit AW_BUILD Call sdk.AwCreate(login-bot.dreamlandpark.com, 5670) 'it keeps seperating - like login - bot.dreamlandpark.com 'i need to know how to make it log innnnnnnn! sdk.QuickStart Citnum.Text, PPW.Text, Botname.Text, "Project1", World.Text, EastWest.Text * 1000, Altitude.Text * 1000, NorthSouth * 1000, 0, BotAV.Text Timer1.Interval = 1000 Timer1.Enabled = True cmdlogin.Enabled = False Err: If Err.Number = 13 Then MsgBox "You typed an invalid character" Call WriteToINI("LoginInfo", "citnum", Citnum.Text, App.Path & "\LoginInfo.ini") Call WriteToINI("LoginInfo", "PPW", PPW.Text, App.Path & "\LoginInfo.ini") Call WriteToINI("LoginInfo", "Botname", Botname.Text, App.Path & "\LoginInfo.ini") Call WriteToINI("LoginInfo", "World", World.Text, App.Path & "\LoginInfo.ini") Call WriteToINI("LoginInfo", "North/South coords", NorthSouth.Text, App.Path & "\LoginInfo.ini") Call WriteToINI("LoginInfo", "East/West", EastWest.Text, App.Path & "\LoginInfo.ini") Call WriteToINI("LoginInfo", "Altitude", Altitude.Text, App.Path & "\LoginInfo.ini") Call WriteToINI("LoginInfo", "Bot Avatar", BotAV.Text, App.Path & "\LoginInfo.ini") Call WriteToINI("LoginInfo", "Welcome Message", Welcome.Text, App.Path & "\LoginInfo.ini") End Sub [View Quote] baronJan 10, 2002, 10:01pm
I don't think the word "weird" applies here, I'd use convenient, versatile, flexible or something of the kind. Except if you mean "weird" as in "Chinese look weird"...they don't look weird for the Chinese :)
-Baron [View Quote] grimbleJan 11, 2002, 12:43am
Two separate threads for this one huh?? In Bots and SDK. Bummer - wasted
my time in the previous thread :( Anyway, login-bot.dreamlandpark.com is a string literal and as such needs to be enclosed in quotes (""). Grims [View Quote] baronJan 11, 2002, 5:39am
The error you get is that you use a string literal and it's not in quotes as Grimble pointed. I have never used the quickstart method but from the arguments it takes I assume it calls sdk.AwCreate(0,0) by default for the given bot instance so I doubt it will work for other universes. You'll probably have to go through the normal login process:
Cal first sdk.AwInit then sdk.AwCreate Set sdk.AwLoginOwner, sdk.AwLoginPrivilegePassword, sdk.AwLoginName, sdk.AwLoginApplication Call sdk.AwLogin, then sdk.AwEnter Finally set sdk.AwMyX, sdk.AwMyZ, sdk.AwMyY and sdk.AwMyType and then call sdk.AwStateChange. http://www.grimmsoft.com/help/index.php?parent=1 and http://www.activeworlds.com/sdk/ have everything you need to make the above work. I could have posted some code but my belief is that you really learn something when you spend the time to figure it out yourself...the old "teaching someone how to fish" saying. -Baron [View Quote] trekkerxJan 12, 2002, 5:07am
sdk.awcreate( "www.url_for_uniserver", 5670)
^HOST DNS NAME OR IP^ ^ PORT -- TrekkerX Commatron & Athnex http://www.commatron.com http://www.athnex.com [View Quote] |