ThreadBoard ArchivesSite FeaturesActiveworlds SupportHistoric Archives |
Re: VB Wrapper - Callback Functions & AWCitizenAttributesBYNumber (Bots)
Re: VB Wrapper - Callback Functions & AWCitizenAttributesBYNumber // BotsxelagSep 22, 2000, 3:20pm
I'm not a VB person, but am I wrong in assuming that, having installed a
callback function, you should get the result of your citizen query inside the callback, and not in the calling function? It seems to me that what you call your callback is the calling function.... And, do you sent the bot instance before calling sdk2.AwCitizenAttributesByNumber(i) ? AwCitizenAttributesByNumber, in the calling function, should not block or give you a valid answer if you installed a callback, the answer comes in the callback itself. In sdk2.AwCallbackSet AW_CALLBACK_CITIZEN_ATTRIBUTES where is the pointer to callback function ? AwCallbackSet has, in C, two parameters: the type of callback, in this case AW_CALLBACK_CITIZEN_ATTRIBUTES, and a pointer to an entry point for the callback function itself. I don't know how to do this in VB, but it seems to be missing here. Calling for a series of citizen numbers in a row (1 to 10 in this case) can overload the universe server and is frowened upon, you should only use this call when absolutely necessary. I never send 2 calls in a row, but I wait for the callback to trigger (or for a timeout) before sending a second request: play it safe :) XelaG [View Quote] |