ThreadBoard ArchivesSite FeaturesActiveworlds SupportHistoric Archives |
problem with a bot (Sdk)
problem with a bot // Sdkjan-willem de bleserSep 27, 1998, 3:56pm
This is a multi-part message in MIME format.
--------------49940954135AC71595FC0F50 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit whats wrong with this? ofstream outfile("chat.log", ios::app); while (!aw_wait (1)) { int sequence[3][3]; for(int i = 0; i < 3; i++) for(int j = 0; j < 3; j++) sequence[i][j] = 0; aw_query (aw_int(AW_MY_X), aw_int(AW_MY_Z), sequence); outfile << "AW_query called to query the starting location\n"; if(_kbhit()) { gets(input); console_command(input); } } it wont even print to the outfile that aw_query was called. can anyone help me? --------------49940954135AC71595FC0F50 Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Jan-willem De Bleser Content-Disposition: attachment; filename="vcard.vcf" begin: vcard fn: Jan-willem De Bleser n: De Bleser;Jan-willem org: High school email;internet: debleser at mediaone.net x-mozilla-cpt: ;0 x-mozilla-html: FALSE version: 2.1 end: vcard --------------49940954135AC71595FC0F50-- roland vilettSep 27, 1998, 4:42pm
Well it probably has something to do with how you are using the ofstream
class. I'm not a C++ expert so I'll let someone else in this newsgroup look at that part. I should mention that you should not pass aw_int (AW_MY_X) in for the sector coordinates to aw_query(). AW_MY_X is in units of centimeters, whereas sector coordinates are in units of 80 meters. In sample app #2 I'll show how to convert from centimeter coordinates to sector coordinates. -Roland [View Quote] jan-willem de bleserSep 27, 1998, 8:18pm
This is a multi-part message in MIME format.
--------------B209C2F0B2FEC3E2BFAABB0A Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit [View Quote] > Well it probably has something to do with how you are using the ofstream > class. I'm not a C++ expert so I'll let someone else in this newsgroup look > at that part. I know its not that because i can log chat and events with that setup of oftream in exactly the same way. the thing is that the program ignores ALL the commands i added which are the following commands, while it doesnt ignore _kbhit()<added code that it ignores> int sequence[3][3]; for(int i = 0; i < 3; i++) for(int j = 0; j < 3; j++) sequence[i][j] = 0; aw_query (aw_int(AW_MY_X), aw_int(AW_MY_Z), sequence); outfile << "AW_query called to query the starting location\n"; </> > > > I should mention that you should not pass aw_int (AW_MY_X) in for the sector > coordinates to aw_query(). AW_MY_X is in units of centimeters, whereas > sector coordinates are in units of 80 meters. In sample app #2 I'll show > how to convert from centimeter coordinates to sector coordinates. > > -Roland > [View Quote] --------------B209C2F0B2FEC3E2BFAABB0A Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Jan-willem De Bleser Content-Disposition: attachment; filename="vcard.vcf" begin: vcard fn: Jan-willem De Bleser n: De Bleser;Jan-willem org: High school email;internet: debleser at mediaone.net x-mozilla-cpt: ;0 x-mozilla-html: FALSE version: 2.1 end: vcard --------------B209C2F0B2FEC3E2BFAABB0A-- roland vilettSep 27, 1998, 10:24pm
It's possible there may be a problem with the aw_query() call in synchronous
mode then. I assume you haven't installed the AW_CALLBACK_QUERY callback, so that means the aw_query() call will not return until the query request completes. I'll try to look at this soon. -Roland [View Quote] jan-willem de bleserSep 28, 1998, 9:14am
This is a multi-part message in MIME format.
--------------AA2C4CE540CE2C7DCEBF19F3 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit i dont understand callbacks [View Quote] > It's possible there may be a problem with the aw_query() call in synchronous > mode then. I assume you haven't installed the AW_CALLBACK_QUERY callback, > so that means the aw_query() call will not return until the query request > completes. I'll try to look at this soon. > > -Roland > [View Quote] --------------AA2C4CE540CE2C7DCEBF19F3 Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Jan-willem De Bleser Content-Disposition: attachment; filename="vcard.vcf" begin: vcard fn: Jan-willem De Bleser n: De Bleser;Jan-willem org: High school email;internet: debleser at mediaone.net x-mozilla-cpt: ;0 x-mozilla-html: FALSE version: 2.1 end: vcard --------------AA2C4CE540CE2C7DCEBF19F3-- jan-willem de bleserSep 30, 1998, 12:26pm
This is a multi-part message in MIME format.
--------------6D4EC2303B7C7F351BEE9636 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit when will sample app 2 come out? [View Quote] > Well it probably has something to do with how you are using the ofstream > class. I'm not a C++ expert so I'll let someone else in this newsgroup look > at that part. > > I should mention that you should not pass aw_int (AW_MY_X) in for the sector > coordinates to aw_query(). AW_MY_X is in units of centimeters, whereas > sector coordinates are in units of 80 meters. In sample app #2 I'll show > how to convert from centimeter coordinates to sector coordinates. > > -Roland > [View Quote] --------------6D4EC2303B7C7F351BEE9636 Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Jan-willem De Bleser Content-Disposition: attachment; filename="vcard.vcf" begin: vcard fn: Jan-willem De Bleser n: De Bleser;Jan-willem org: High school email;internet: debleser at mediaone.net x-mozilla-cpt: ;0 x-mozilla-html: FALSE version: 2.1 end: vcard --------------6D4EC2303B7C7F351BEE9636-- jan-willem de bleserSep 30, 1998, 12:43pm
This is a multi-part message in MIME format.
--------------1B36F1AA11664268F097CFA6 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit so if i do aw_query (0, 0, sequence); everything from GZ to 8N/S/E/W is queried? [View Quote] > Well it probably has something to do with how you are using the ofstream > class. I'm not a C++ expert so I'll let someone else in this newsgroup look > at that part. > > I should mention that you should not pass aw_int (AW_MY_X) in for the sector > coordinates to aw_query(). AW_MY_X is in units of centimeters, whereas > sector coordinates are in units of 80 meters. In sample app #2 I'll show > how to convert from centimeter coordinates to sector coordinates. > > -Roland > [View Quote] --------------1B36F1AA11664268F097CFA6 Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Jan-willem De Bleser Content-Disposition: attachment; filename="vcard.vcf" begin: vcard fn: Jan-willem De Bleser n: De Bleser;Jan-willem org: High school email;internet: debleser at mediaone.net x-mozilla-cpt: ;0 x-mozilla-html: FALSE version: 2.1 end: vcard --------------1B36F1AA11664268F097CFA6-- roland vilettSep 30, 1998, 4:48pm
Actually, not quite...the first 1K or 2K of property data (depending on
whether it is a 2.0 or 2.1 world) is returned from a single call to aw_query(). If there is more data available, the app must adjust the sequence number list based on the results of the first query and issue additional queries. Again, I will illustrate how to do this in sample app #2, hopefully within the next couple of days. -Roland [View Quote] |