veleno // User Search

veleno // User Search

1  2  |  

Borland?

Sep 27, 1998, 5:41am
I have Borland C++ 4.42 programming compiler. Every time I try to compile
an SDK bot with the aw.lib file, it returns

Linker Fatal: Bad object file record in aw.lib near module file offset
0x0000000000.

I don't know if I am doing anything wrong, or something isn't compatible
with my Borland environment.

Borland?

Sep 27, 1998, 6:17pm
Ok, thanks for that information about the DOS Compiler... but now when I
run the batch file with my c sourse code, it returns this message...

Warning c:\bc45\bin\bot.c 26: Possibly incorrect assignment in function
main
Warning c:\bc45\bin\bot.c 37: Possibly incorrect assignment in function
main
Warning c:\bc45\bin\bot.c 53: Possibly incorrect assignment in function
main
Error: Undefined symbol _aw_say in module c:\bc45\bin\bot.c
Error: Undefined symbol _aw_string in module c:\bc45\bin\bot.c
Error: Undefined symbol _aw_int in module c:\bc45\bin\bot.c
Error: Undefined symbol _aw_term in module c:\bc45\bin\bot.c
Error: Undefined symbol _aw_destroy in module c:\bc45\bin\bot.c
Error: Undefined symbol _aw_wait in module c:\bc45\bin\bot.c
Error: Undefined symbol _aw_state_change in module c:\bc45\bin\bot.c
Error: Undefined symbol _aw_int_set in module c:\bc45\bin\bot.c
Error: Undefined symbol _aw_enter module c:\bc45\bin\bot.c
Error: Undefined symbol _aw_login in module c:\bc45\bin\bot.c
Error: Undefined symbol _aw_string_set in module c:\bc45\bin\bot.c
Error: Undefined symbol _aw_create in module c:\bc45\bin\bot.c
Error: Undefined symbol _aw_event_set in module c:\bc45\bin\bot.c
Error: Undefined symbol _aw_init in module c:\bc45\bin\bot.c

It does create the bot.exe program, but when it is run, the program stalls
and won't do anything else...
How do I fix this problem?



cableguy <ttoth9 at ix.netcom.com> wrote in article
<360DEBA5.85D823FE at ix.netcom.com>...
> Contending with Borland C++4.0 >
> Borland C++ Version 4.0 and later is radically different from Borland's
> earlier C language packages. Primarily, Borland C++4 is a Windows only
thing.
> It only creates Windows programs. And unlike MS-V C++, it is extremely
> unforgiving if you try to write a meek old DOS program. You have to use
it at
> the DOS prompt. Forget Windows. Forget the pretty Borland C++ programs.
> Forget what you spent for this turkey.
> Before starting, make sure that you include Borland C++'s subdirectory
on
> your DOS search PATH. The directory that you want is \BC4\BIN. So if that
is
> on drive C:, you want the search path to be
path=c:\dos;c:\util;c:\bc4\bin
> The second thing to do is create a batch file that will help you
> automatically compile your programs. Use a text editor to create this
batch
> file in your \bc4\bin directory..
> at ECHO OFF
> BCC -IC:\BC4\INCLUDE -LC:\BC4\LIB %1
> Save this as CC.BAT in your \BC4\BIN directory. You can now use the
compiler
> at the DOS prompt.
> At the DOS prompt use the CC command to compile and link your bot.c
program,
> c:\CC bot.c and you must use the source files extension .c or the program
> will not be created. The CC batch file runs Borlands C++ compiler and
linker
> and if everything goes as planned you get your bot.exe file.
>
[View Quote]

Borland?

Sep 27, 1998, 6:35pm
I added it into the project file in the windows GUI, and it returned the
first fatal error...
I do not know how to add the aw.lib file to the bot.c source while trying
to compile in DOS.... any help?

cableguy <ttoth9 at ix.netcom.com> wrote in article
<360E92B3.691C8D0B at ix.netcom.com>...
> Did you add aw.lib to the project? This looks like errors that I got
before I
> added aw.lib to mine the first time. I'm not sure how to add it with
Borland4,
> I use Borland3 and VC6

Borland?

Sep 27, 1998, 8:56pm
No... there isn't any DOS editing screens that i've found... everything
works from windows... is there any other way to link aw.lib?

cableguy <ttoth9 at ix.netcom.com> wrote in article
<360E95B3.9BF7E53F at ix.netcom.com>...
> Well in Borland 3 if you type BC at the DOS prompt the editing screen
pops
> up, you could try that and see if it still works with ver4

GNU functions...

Oct 7, 1998, 12:52am
well... an example of my code is:
#define bot_name "bot"
....
void handle_chat (void)
{
if (!strcmp aw_string (AW_CHAT_MESSAGE), bot_name) {
aw_say("Don't say my name");
printf ("%s said my name", aw_string (AW_AVATAR_NAME));
}
}

aw_event_set (AW_EVENT_CHAT, handle_chat);

compiler returns:
warning: passing arg 1 of 'strcmp' from incompatible pointer type
too few arguments to function 'strcmp'
called object is not a function

[View Quote] > You must include some code in these kind of questions but let me give it a
> shot.
>
> Your using standard C, the fact that you are using the GNU compiler is
> irrelevant.
>
> The strcmp function is a standard C function that compares two strings. The
> usual problem people make with this function is that it returs zero meaning
> that the strings are equal. So the code
>
> if (!strcmp("A", "A")) {
>
> printf("They are equal.\n");
> }
>
> works just fine.
>
> If you are getting a compile error make sure that you are including the
> <stdlib.h> include file.
>
> When you say, get it to use the message array, what do you mean.
>
> A message array in C would comprise a two dimensional array of characters.
> For example,
>
> char message[32][10];
>
> represents 10 strings of 31 bytes long. 31 because there must always be
> space for a NULL (byte 0) terminator at the end of the string.
>
> So you can trap the AW_EVENT_CHAT event and store each AW_CHAT_MESSAGE
> string in the array until you fill it up.
>
> Edward Sumerfield
>
[View Quote]

Time sequencing...

Oct 14, 1998, 9:55pm
I have my bot. But I want him to be able to recognize the VRT in the
Activeworlds browser. So he can change the backdrop and ground texture
from Night to Day according to the VRT time. How would I get him to do
that?

Time sequencing...

Oct 14, 1998, 10:56pm
Alright, I'm still learning C/C++... so I don't know what the time() is or does.
Anybody care to explain how to use it?

[View Quote] > No VRT is not built into the SDK. VRT is simply GMT minus two hours.
> You'll have to write your own code in your bot to calculate the current time
> in VRT. There are a variety of calls under Windows that can give you the
> current time in GMT. time() is one of them.
>
> -Roland
>
[View Quote]

User counts

Oct 20, 1998, 12:59am
Alright... I've heard a lot of talk about the 2.1 Server and Browser... but I
don't know much about it, myself... is there somewhere that the information on
it is posted?
Next point... I'm wondering bout the world bot user counts... I was on a
friends world, that had a user limit of 8 people. There were 8 people in there
that night, plus his bot. The worlds list showed a user count of 9 people...
what accounts for that?

[View Quote] > Actually no. Most of the worlds run by COF are still running 2.0 worlds.
> We are currently testing the 2.1 server with a about a dozen worlds, but the
> vast majority are still 2.0.
>
> Also SDK bots will work in 2.0 worlds. The SDK has code that detects
> whether a world is a 2.0 or 2.1 server, and changes protocols appropriately.
> I think only one the one function aw_whisper() will not work in 2.0 worlds.
>
> -Roland
>
[View Quote]

Bot logging...

Oct 20, 1998, 6:57pm
Alright... I've gotten my bot to do what I want him to (finally!) but
I'm just wondering how I would get him to log to a text file... in
essence, the same as the world server does...

Bot logging...

Oct 21, 1998, 6:46pm
I got this program you listed here to work, but how would I get the bot to....
for instance, greet people and then log the event to the file?

[View Quote] > These days you have to specify the language you are programming in. This is
> such a diverse SDK that its hard to tell.
>
> Let me assume C.
>
> #include <stdio.h>
> main() {
>
> FILE *log_file;
> char *text="the meaning of life the world and everythin is";
>
> log_file = fopen("log_file.txt", "w+");
> if (!log_file) {
> printf("Doh.");
> } else {
> fprintf(log_file, "This is writting to the log file: %s %d.\n",
> text, 42);
> close(log_file);
> }
> }
>
> Edward Sumerfield.
>
[View Quote]

Bot logging...

Oct 23, 1998, 6:43pm
Yes, I got it... didn't take me very long once I sorted out all of the
messages... hehe... I appreciate all of your help and replies... The Bot Logging
works... :)

[View Quote] > So we all agree then? Cool.
>
> Veleno, I hope you got all that.
>
> Edward Sumerfield.
>
[View Quote]

I need a C Compiler!!

Nov 10, 1998, 2:56am
There's only one decent C compiler for free... that's the GNU... only
problem is that you have to work around the .lib file and use the .dll
All that means is adding code to let the program know what the
opperations are that it must preform. Look further up on this Newsgroup
for more info on the GNU Compiler...
You can always go out and get Visual C/C++ for $90, but I guess that's
not the case, hmm?

[View Quote] > If anyone has a good C compiler i NEED IT BAD!!!Email me!

Build 8 now available

Nov 12, 1998, 8:43pm
Ahh... very good to have an RC code return for the disallowed bots... saves
time and confusion, and resolves the person of thinking it's the bot's
programming at fault... :) I've had this trouble myself...

[View Quote] > Build 8 of the SDK is now available. Please upgrade at your earliest
> convenience.
>
> Build 8 fixes two problems:
>
> 1. aw_wait() had a small memory leak
>
> 2. aw_enter() should no longer hang when attempting to enter a world that
> does not allow bots. It should now correctly return RC_NOT_WELCOME (467).
>
> -Roland

server and bots

Nov 14, 1998, 8:12am
You CAN run a background changer with the SDK using a collective program
of relatively simple functions... The world server version does not affect
the SDK other than the world user counts. All that Roland was reffering to
was that the AW Universe is the only UNIVERSE that the SDK can be run
in... so, SeeRay Studios, or City4All couldn't be able to run the SDK
bots.
I think someone posted some source for a background changer in a higher
thread in this NG... maybe worth some time to look for it if you're
interested...
Oh, just one more note. The bot CAN change the background, but you need to
be caretaker of the world for your bot to change the background, since it
runs on your priv. pass.....

[View Quote] > I am confused,,,
>
> I currnetly run a bot from hamfon in my world, running my own server
> using build 9, can I or can I not run a background changer built using
> the SDK
> dll.

STATUS_ACCESS_VIOLATION

Nov 15, 1998, 5:32am
whenever I run a AWbot program where I do some string managing, my bot
is killed and I get
Exception: STATUS_ACCESS_VIOLATION
Dumping stack trace to bot.exe.core

what is really returning this error?

Using the Borland Compiler

Nov 20, 1998, 4:19am
I tried doing this in my borland, and all that impdef gave back to me was an
empty def file and this error msg

Exception C0000005: Access violation
Module: IMPDEF.EXE Start address: 00410000
EAX=72AC3000 EBX=006A0E3C ECX=FFFFFFFF EDX=006A21E8 ESI=006A1000
EDI=72AC3045 EIP=004146C7 EBP=0068F920 ESP=0068F91C EFL=00010246

Now.... can you guys tell me why it's not working....

[View Quote] > It's a three step process.
> First, use IMPDEF to create a .DEF file for AW.LIB:
> IMPDEF c:\[sdk directory]\aw.def c:\[sdk directory]\aw.dll
> Then, you have to edit the .DEF file. The lines are like this:
> aw_login at 2h
> And need to be like this:
> _aw_login = aw_login
> Once you've corrected all of them, use IMPLIB to make a Borland-compatible
> .LIB file as shown:
> IMPLIB c:\[sdk directory]\aw.lib c:\[sdk directory]\aw.def
> Now just link the new AW.LIB file into your program, and you're all set!
> Good Luck!
>
> [cyborganic][cyborganic at hotmail.com]
>
[View Quote]

Moving the bots

Nov 21, 1998, 1:29am
I want to know how I can get the bot to respond to avatars within a
certain radius of himself, and follow them for a distance, then return
to his original position... any takers?

Moving the bots

Nov 21, 1998, 4:22am
--------------3EB159911E66580DAE68CD65
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I am not sure I see what you are going for. I am using the GNU, which I
think is of somwhat difference from the AWCPP. I don't know what the
delta_x, z variables represent in the programming source.
I also want to understand what each of the values represent (ie, what
sets the react range, and the follow distance) so I can modify the code
myself once I get successfull implementation. Also, where in the source
of the bot would these lines take place? I am not sure if you would need
to call another event header or what...

[View Quote] > Just a little programmer nit-pick, but you can save yourself a little
> trouble by dropping the absolute value conversions for the deltas
> since you are about to square them, which will cancel out any negative
> values. In other words, delta_x * delta_x has the same value
> regardless of whether delta_x is positive or negative. -Roland
>
[View Quote] --------------3EB159911E66580DAE68CD65
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<body bgcolor="#FFFFFF">
I am not sure I see what you are going for. I am using the GNU, which I
think is of somwhat difference from the AWCPP. I don't know what the delta_x,
z variables represent in the programming source.
<br>I also want to understand what each of the values represent (ie, what
sets the react range, and the follow distance) so I can modify the code
myself once I get successfull implementation. Also, where in the source
of the bot would these lines take place? I am not sure if you would need
to call another event header or what...
[View Quote] </body>
</html>

--------------3EB159911E66580DAE68CD65--

Moving the bots

Nov 21, 1998, 2:56pm
--------------AE8D797CA06B21CC0CE1D288
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I went to your AWCPP page, but I haven't been able to make much sense of
it. In part, because I haven't done much in C++, just normal C.... The
page says you have examples, but at the moment, if I'm to get started in
this thing, it would be a great deal easier if I could just see the
straight source of an example... like Rolland Vilett has on his SDK
documentation...

[View Quote] > Xelag said it.
>
> AWCPP is implemented entirely in GNU G++. The version implemented by
> Cygnus at http://www.cygnus.com
>
> You can find the source I referenced at
>
> http://members.xoom.com/esumerfd/ActiveWorlds/AWCPP/
>
> Infact, I just released version 0.3 that supports a complete Avatar
> tracking model.
>
> The one thing I might modify in Xelags write-up is the design approach
> and this depends entirely on where you are coming from as a developer.
> Xelag mentioned the idea of multiple robots and how to keep track of
> the appropriate positions. That is a C design problem. With the AWCPP
> design in C++ we already have all that encapsulation. This is an
> excellent example of why OO design is so powerful.
>
> So, if you are learning C I would recommend learning C++ straight away
> and forget C. If you are a C programmer I would recommend getting into
> C++ fast. It has taken me, a veteran C programmer, 5 years now to feel
> comfortable working with OO design concepts.
>
> It seems to be an industry problem for procedural programmers (C) to
> reenginner their thinking processes to become OO programmers (C++).
> Good luck.
>
> Roland, thanks for the tip. I didn't spot that one.
>
> Edward Sumerfield.
>
[View Quote] --------------AE8D797CA06B21CC0CE1D288
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<body bgcolor="#FFFFFF">
I went to your AWCPP page, but I haven't been able to make much sense of
it. In part, because I haven't done much in C++, just normal C.... The
page says you have examples, but at the moment, if I'm to get started in
this thing, it would be a great deal easier if I could just see the straight
source of an example... like Rolland Vilett has on his SDK documentation...
[View Quote] </body>
</html>

--------------AE8D797CA06B21CC0CE1D288--

Moving the bots

Nov 30, 1998, 8:45pm
I'm still unsure as where to start with what to get this to work....

[View Quote] > I thought we had specked that out? Let me know were you are having problems.
>
[View Quote]

Moving the bots

Dec 1, 1998, 7:37pm
[View Quote] > Are Veleno and Fast the same person or just two interested parties?

Sorry about the confusion. Me and Fastwalker (Fast) are two
different people. I know him in AW.

>
> So were do you want me to start?
>
> Do you have a C compiler? Which one?
>

Right now, since I don't feeling like shelling out $90, I'm running
the GNU from Cygnus.

>
> Have you written bots before?
>

Yes, actually I have about seven bots resident on my system, though
I only run one or two on a regular basis.

>
> What is your level of C experience?

Umm... I have a programming book on C/C++, but I've only been at
it since early August. So I know what I'm doing, but don't have much of
the experience needed yet. Still learning. Got into the SDK around Build
5, if that means anything to you...

>
>
[View Quote]

Moving the bots

Dec 3, 1998, 12:33am
why is the makefile in a renderware extension? How can it work?

[View Quote] > Here is a working solution. Most is cut and paste from my C++ AWCPP into this
> C program.
>
> It waits for someone to walk within 5 meters of it and then follows them for
> 60 seconds after which it runs back to its starting position.
>
> To run you will require:
>
> 1. Cygnus GNU G++ compiler.
> 2. The awsdk.lib wrapper that was built to interface with COF's aw.dll.
> 3. Just type make to create the exe file.
>
> If you do not change anything then to test:
>
> 1. Goto Beta and teleport to 99n 99w 0a 45.
> This will place you 10 meters away from the bot and facing it.
> 2. Run the bot using "follower <citizen number> <priv password>"
> 3. The bot will report your distance as you approach. When you are with 5
> meters which
> is reported as 500 cm it will switch into follow mode and move to 1 meter
> behind you facing
> in the same direction as you are.
>
> Good luck.
>
> Edward Sumerfield.
>
[View Quote]

Moving the bots

Dec 3, 1998, 11:19am
Strange... the makefile gave itself the .rwx extension when i saved it to my computer. I
don't need it right now. I converted the follower.c source over to standard GNU format. A
bit longer (2k more). But it's compiled just with the normal gcc.exe (I am running C, not
C++ right now). And I did get that to run.
Thanks Edward!

[View Quote] > I don't understand. A renderware extension? Like .rwx?
>
> The c file has the extension of ".c" and the Makefile has no extension. Makefile is the
> standard name that the command make looks for when you run it. You can of coarse call
> your makefile anything you like but you would have to add the "-f <file name>"
> parameter to tell the make command which file to use.
>
> o Copy both files into one diretory
> o cd to that directory
> o export AWSDK=<path were you installed aw.h>
> o make sure that the aw.dll is in a directory in your PATH
> o make
> o follower <number> <priv>
>
> Edward Sumerfield.
>
[View Quote]

Moving the bots

Dec 3, 1998, 7:53pm
The way you have your AWCPP written, you need the lib file to make it
work, and the makefile. The normal way of running the sdk through the
GNU is bypassing the aw.lib through the aw.dll defining the methods
manually. I've been using this system for a while, so I feel comfortable
with the layout.
I assume you've seen the source of GNU sdk bots that have done that.
(ie, "aw_int" is "(AWInt)").
There's an example source in a higher thread...

[View Quote] > I'm glad it worked for you.
>
> What did you mean by "converted to standard GNU format"?
>
[View Quote]

supresing bot name [imabot] display

Nov 21, 1998, 2:29pm
This depends on if you are the world's caretaker. If so, then you will see
all avatar names over them whether they talk or not. If they do not talk,
nobody else can see the names, so it's not that big of a deal... and so far,
I don't think there's any way to 'supress' the names...

[View Quote] > I'm working on flocking bots and other animal-style behaviors, for which
>
> I'd prefer that the bot name not appear above the avatar. These things
> are just going
> to move around in a lifelike way, not speak. The docs for AW_LOGIN_NAME
> say that
> the bot name will appear above the bot if it speaks - but it seems to
> appear even
> if the bot doesn't speak - is there a way to supress it appearing?
>
> Chris Langton
>
> AKA MockingBird

object commands

Dec 1, 1998, 1:53am
Sure is. If the sdk is having to change the object alone, you will need
to query the sector for the object so it knows what to change, then you
need to tell it what to do... look at the second sdk sample in the SDK
docs on activeworlds homepage. If you are creating an object, then
modifying it, you should be able to skip the query process and save
yourself some scripting lines, only trouble with that is if you don't
have the bot deconstruct the object before he leaves the world, then
there is a tendancy to be a pile up of the object every time the bot
comes in, and places another to the stack. Which then you have to go in
and manually delete.... a pain on its own.

[View Quote] > is there a way to assign action and description commands to an object
> using the sdk.

Format of TimeStamp field

Dec 1, 1998, 7:41pm
I have a recent question on something of this. In a thread farther up I
was asking about the time(). I got the example given to run, but when I
tried to get the bot to timestamp the console window when someone came
in, everytime someone entered, it would just crash with a core dump. I
can post the contents of the dump if it's necissary... any reason why
this doesn't work?

[View Quote] > What timestamp field?
>
> If you are referring to the standard C time_t which is actually just
> an int then take a look at the localtime function. It returns you the
> following structure.
>
> struct tm
> {
> int tm_sec;
> int tm_min;
> int tm_hour;
> int tm_mday;
> int tm_mon;
> int tm_year;
> int tm_wday;
> int tm_yday;
> int tm_isdst;
> };
>
> Edward Sumerfield.
>
[View Quote]

Format of TimeStamp field

Dec 3, 1998, 12:16am
well, the program works just fine without the timestamp coding. then once I add
it and it is activated (ie, by the user entering the world) then the bot
crashes. So, I would think it obviously has something to do with the timestamp.
Nothing else in the program was altered aside from adding that coding.

[View Quote] > Try and find out on which line the program crashes. Either by adding printf
> statements until you narrow it down or by using the debugger and stepping
> through until it crashes.
>
> You describe a problem that may have nothing to do with a time function.
>
[View Quote]

Ejecting...

Dec 6, 1998, 3:14pm
Ok, I'm back...
I have my bot stationed at a specific place in my own world. What he's
SUPPOSED to do, is check the person's citizen number when they walk too
close, and if it matches one of the numbers on the right's list, then it
lets em pass, otherwise... ejection. My only problem is getting the bot
to find the person's citizen number... anything i've tried so far has
just resulted in a core dump of the program every time someone got too
close...
I need a way to get the bot to recognize citizen number of the avatar on
approach. Not from the chat line, which is my problem. Anybody got a
solution? or something close to it that would serve the same purpose is
plenty well fine....

Ejecting...

Dec 8, 1998, 12:28am
I know about that already. My problem is not in getting it to recognize
them... it's in getting their avatar number from the avatar_change(). Getting
the number from the avatar_add() won't do me much good since it doesn't keep
it. I have the ability to get the information out of the rights list about
the citnums. and have gotten that to work successfully... (asking if the
number is a PS or not, but from the chatline) what I need is for the bot to
be able to do the same function, but not voiced by a third party. Anybody
understand what I'm trying to say?

[View Quote] > Sure. If you install the event handler for AW_EVENT_AVATAR_ADD whith
> aw_event_set(...), then, in the event handler,
> aw_string(AW_AVATAR_NAME) gives you the name of the avatar when it is
> detected by the bot. You can then ask for the citizen number of the
> avatar using rc = aw_citizen_attributes_by_name(<name of avatar>).
> This will return either:
>
> (i) inmediately, then if rc = 0 you find the citizen number using
> aw_int(AW_CITIZEN_NUMBER), if rc <> 0 then its not a citizen and the
> values of aw_int and aw_string are worthless.
>
> (ii) using a callback function. If you use callbacks, then make sure
> you ask again for the citizen name with aw_string(AW_CITIZEN_NAME), to
> make sure its the same name you sent. The advantage of the callback is
> you dont have to wait for aw_citizen_attributes_by_name to return.
>
[View Quote]

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