Thread

AwQuery5x5 in VB, how does it work? (Sdk)

AwQuery5x5 in VB, how does it work? // Sdk

1  |  

kah

Nov 25, 2001, 12:44pm
hi, I'm trying to use Query5x5 in VB with AwSdkOcx4, but I don't know what
to do from the first CallbackQuery and on. for starting the query I use the
sample code that came in the query5x5.txt file distributed with AwSdkOcx4,
this is my CallBackQuery code:

If Not sdk.AwQueryComplete Then
rc = sdk.AwQuery5x5(XSector, ZSector, m_seq)
Debug.Print "this is where I am: " & sdk.AwCellSequence
Else
ConsoleMsg "all done! Found " & ObjCount & " objects."
End If

and this is my sdk_EventCellBegin code (adapted from AwQuery, I guess this
is where the problem is):
Private Sub sdk_EventCellBegin()
Dim X As Long, Z As Long
XCell = sdk.AwCellX
ZCell = sdk.AwCellZ
X = sdk.AwSectorFromCell(XCell) - XSector
Z = sdk.AwSectorFromCell(ZCell) - ZSector
If (X < -1 Or X > 1 Or Z < -1 Or Z > 1) Then
Exit Sub
End If
m_seq(Z + 1, X + 1) = sdk.AwCellSequence
End Sub

when I tryed doing sdk.AwQuery5x5 m_seq(1, 1) the SDK crashed with runtime
error 440.

KAH

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