Thread

aw_wait modification (Sdk)

aw_wait modification // Sdk

1  |  

jeanphi

Nov 8, 1998, 2:54pm
Hello,

I wrote a bot program that is supposed to shutdown himself when a specific
avatar tells him 'bot14 close'.

But it seems that because the aw_wait function is still active during this
time my prgram bugs !

I was thinking about maybe Roland could implement a function that stops
waiting, or is there another way to face my problem ?

thank you

edward sumerfield

Nov 8, 1998, 4:55pm
You can set flags in your callback functions that are checked in the main
program loop.

bool finish = 0;
main() {
while (aw_wait(1000)) {
if (finish == 1) break;
}
}
void chat_callback() {
if (chat message == "quit") finish = 1;
}

Make sure that the finish flag is global or at least addressable by both
functions.

Edward Sumerfield.

[View Quote] > Hello,
>
> I wrote a bot program that is supposed to shutdown himself when a specific
> avatar tells him 'bot14 close'.
>
> But it seems that because the aw_wait function is still active during this
> time my prgram bugs !
>
> I was thinking about maybe Roland could implement a function that stops
> waiting, or is there another way to face my problem ?
>
> thank you

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