Thread

3.4 vb sdk (Sdk)

3.4 vb sdk // Sdk

1  2  |  

scuz

Jan 31, 2003, 10:36pm
would sombody pleeeeeease make a 3.4 vb sdk.

agent1

Jan 31, 2003, 10:39pm
Read my reply to your last post on this exact subject.

-Agent1

[View Quote]

scuz

Feb 1, 2003, 5:05am
yes i know, but i really need a 3.4 sdk for vb. its mrgrimm who made the
current one, sos i need a 3.4 one.
[View Quote]

strike rapier

Feb 1, 2003, 7:34am
If you want the beta SDK before everyone else, do what the rest of us do
when we need it... Use C++ :P

- Mark

[View Quote]

scuz

Feb 1, 2003, 3:36pm
i know 1 command in C++, print
ROFL

[View Quote]

bowen

Feb 1, 2003, 5:01pm
[View Quote] Mmm, function.

--Bowen--

baron sweetman

Feb 1, 2003, 7:25pm
"bowen" <thisguyrules at 7k2.4mg.com.ANTISPAM> wrote in news:3e3c1973
at server1.Activeworlds.com:

>
[View Quote] print? i know printf, sprintf, fprintf never heard of print :)

john

Feb 1, 2003, 9:05pm
cout & cin

ROCK
!!

!!

IOSTREAM.H FOREVER!


[View Quote]

bowen

Feb 1, 2003, 10:37pm
> print? i know printf, sprintf, fprintf never heard of print :)

I know, I was just saying that it'd be a function.

--Bowen--

bowen

Feb 1, 2003, 10:38pm
[View Quote] Um, they have their disadvantages at times. 1337 p33p5 u53 printf.

--Bowen--

grimble

Feb 2, 2003, 12:41am
Sort your lives out will ya and take this sad crap somewhere else.

Is this seriously the best you can do in a technical newsgroup?



[View Quote]

strike rapier

Feb 2, 2003, 9:37am
all hail printf, the most printyf'ish thing of all!

- Mark

[View Quote]

.duo.

Feb 3, 2003, 6:16pm
That's not even in C++, thats in C, LOL
[View Quote]

.duo.

Feb 3, 2003, 6:17pm
I agree, the C functions suck :-P
[View Quote]

bowen

Feb 3, 2003, 6:21pm
[View Quote] C++ uses C functions. Why do you think it's called C++? (hint... what can you do
with ints to add one to them)

--Bowen--

.duo.

Feb 7, 2003, 7:56pm
Its based on the same architecture, but C is not as powerful. Hence C++.

BTW, this seems dumb, but I haven't programmed in a while, so I forgot how
to add text to a string, LOL.

Do you use an & sign or a function or what?

[View Quote]

bowen

Feb 7, 2003, 8:01pm
[View Quote] That's arguable. x++ to add one to an int right? Now, using that, why do you think
it's called C++?

> BTW, this seems dumb, but I haven't programmed in a while, so I forgot how
> to add text to a string, LOL.
>
> Do you use an & sign or a function or what?

Well... #include <string.h>
char into_string[256];

then use strcpy(into_string, "text you want entered");

or if you want to append to a string... strcat(into_string,", text you appended");

--Bowen--

.duo.

Feb 7, 2003, 11:24pm
I know those functions but they always crash my bots. >_< Its kind of
annoying how unstable they are.
[View Quote]

.duo.

Feb 7, 2003, 11:31pm
In fact, just now the second function crashed my bot...

bowen

Feb 7, 2003, 11:33pm
[View Quote] Omg... I just felt my IQ go down.

--Bowen--

bowen

Feb 7, 2003, 11:34pm
[View Quote] On that note, I tip my hat to you and suggest you stay in the world of VB.

--Bowen--

.duo.

Feb 7, 2003, 11:45pm
This is a multi-part message in MIME format.

------=_NextPart_000_001F_01C2CEE9.DAFEAAE0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Honestly, I just suck at VB. I can't even get a VB bot to work. I can =
do much more in C++. I just can't add text to these strings. I'm just =
making a rights bot which has taken five minutes so far, its just that I =
can't make it add the text.
[View Quote] Its completely unpolished, rushed, and badly programmed, but oh well.

My bots code:
#define AW_STATIC
#include <iostream.h>
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <aw.h>

void handle_avatar_add (void);
void handle_chat (void);
void handle_avatar_delete (void);
void ProcessRights ();
char* copya (char* t);
bool CheckString (char* o,char* t);
char* addtext (char* o,char* t);
int StringLength (char* t);

bool TheMask =3D false;
bool Builderz =3D false;
bool NelXaga =3D false;
bool Cameron999 =3D false;
bool SuperGuy3 =3D false;
bool Cadet =3D false;

void main (int argc, char *argv[])
{
ProcessRights();
int rc;
//API
if (rc =3D aw_init (AW_BUILD))
{
cout<<"Unable to initialize the API (reason %d)\n"<<rc;
}
//Set events
aw_event_set (AW_EVENT_AVATAR_ADD, handle_avatar_add);
aw_event_set (AW_EVENT_CHAT, handle_chat);
aw_event_set (AW_EVENT_AVATAR_DELETE, handle_avatar_delete);
aw_state_change ();
for (;;)
{
if (aw_wait (1000))
{
break;
}
}
//Bot Instance
if (rc =3D aw_create (0, 0, 0))
{
cout<<"Unable to create bot instance (reason %d)\n"<<rc;
exit (1);
}
//Login Bot
aw_string_set (AW_LOGIN_NAME, "RightsBot");
aw_int_set (AW_LOGIN_OWNER, 342836);
aw_string_set (AW_LOGIN_PRIVILEGE_PASSWORD, "zero");
aw_string_set (AW_LOGIN_APPLICATION, "DuoBot: RightsBot");
if (rc =3D aw_login ())
{
cout<<"Unable to login (reason "<<rc<<")\n";
}
//Enter Bot Into World
if (rc =3D aw_enter ("Jediwrld"))
{
printf("Unable to enter world (reason %d)\n", rc);
exit (1);
}
puts (aw_string (AW_WORLD_WELCOME_MESSAGE));
//Go to place
aw_int_set (AW_MY_X, 0000);=20
aw_int_set (AW_MY_Z, 0000);=20
aw_int_set (AW_MY_YAW, 0000);
aw_int_set (AW_MY_TYPE, 0);
aw_int_set (AW_MY_GESTURE, 0);
if (rc =3D aw_state_change ())
{
cout<<"Unable to change state (reason %d)\n"<<rc;
exit (1);
}
//Main event loop
while (!aw_wait (-1))
;
//Close Bot
aw_destroy ();
aw_term ();
}

void handle_avatar_add (void)
{
char* name =3D new char;
int session;
name =3D copya(aw_string(AW_AVATAR_NAME));
session =3D aw_int(AW_AVATAR_SESSION);
if(!stricmp(name,"TheMask"))
{
aw_whisper(session,"Whisper password to gain rights");
}
else if(!stricmp(name,"Builderz"))
{
aw_whisper(session,"Whisper password to gain rights");
}
else if(!stricmp(name,"NelXaga"))
{
aw_whisper(session,"Whisper password to gain rights");
}
else if(!stricmp(name,"Cameron999"))
{
aw_whisper(session,"Whisper password to gain rights");
}
else if(!stricmp(name,"SuperGuy3"))
{
aw_whisper(session,"Whisper password to gain rights");
}
else if(!stricmp(name,"Cadet"))
{
aw_whisper(session,"Whisper password to gain rights");
}
}

void handle_chat ()
{
char* message =3D new char;
char* name =3D new char;
int session;
message =3D copya(aw_string(AW_CHAT_MESSAGE));
name =3D copya(aw_string(AW_AVATAR_NAME));
session =3D aw_int(AW_CHAT_SESSION);
if(!stricmp(message,"=B6Noob Hater Alpha Boss=B6"))
{
if(!stricmp(name, "TheMask"))
{
TheMask =3D true;
}
}
else if(!stricmp(message,"=B6I Will Build Even Though I Say I =
Won't=B6"))
{
if(!stricmp(name,"Builderz"))
{
Builderz =3D true;
}
}
else if(!stricmp(message,"=B6Noob Hater Beta Supreme=B6"))
{
if(!stricmp(name,"NelXaga"))
{
NelXaga =3D true;
}
}
else if(!stricmp(message,"=B6Large Stinky Gorillas Basking In The =
Sun=B6"))
{
if(!stricmp(name,"Cameron999"))
{
Cameron999 =3D true;
}
}
else if(!stricmp(message,"=B6Theworld is a dumbass noob using =
AWHack=B6"))
{
if(!stricmp(name,"SuperGuy3"))
{
SuperGuy3 =3D true;
}
}
else if(!stricmp(message,"=B6I Had Better Do Well :-P=B6"))
{
if(!stricmp(name,"Cadet"))
{
Cadet =3D true;
}
}
else
{
//Do nothing
}
ProcessRights();
}

void handle_avatar_delete ()
{
char* name =3D new char;
int session;
name =3D copya(aw_string(AW_AVATAR_NAME));
session =3D aw_int(AW_AVATAR_SESSION);
if(!stricmp(name,"TheMask"))
{
TheMask =3D false;
}
else if(!stricmp(name,"Builderz"))
{
Builderz =3D false;
}
else if(!stricmp(name,"NelXaga"))
{
NelXaga=3D false;
}
else if(!stricmp(name,"Cameron999"))
{
Cameron999 =3D false;
}
else if(!stricmp(name,"SuperGuy3"))
{
SuperGuy3 =3D false;
}
else if(!stricmp(name,"Cadet"))
{
Cadet =3D false;
}
else
{
//Do nothing
}
ProcessRights();
}

void ProcessRights()
{
char* b =3D new char;
char* ed =3D new char;
char* ps =3D new char;
char* e =3D new char;
char* bt =3D new char;
b =3D "342836";
ed =3D "342836";
ps =3D "342836";
e =3D "342836";
bt =3D "342836";
if(TheMask =3D=3D true)
{
strcat(b,",312237"); <b><----------- None of these work.</b>
strcat(ed,",312237");
strcat(ps,",312237");
strcat(e,",312237");
strcat(bt,",312237");
}
if(Builderz =3D=3D true)
{
strcat(b,",92986");
strcat(ed,",92986");
strcat(ps,",92986");
strcat(e,",92986");
strcat(bt,",92986");
}
if(NelXaga =3D=3D true)
{
strcat(b,",337709");
strcat(ed,",337709");
strcat(ps,",337709");
strcat(e,",337709");
strcat(bt,",337709");
}
if(Cameron999 =3D=3D true)
{
strcat(b,",350803");
strcat(ed,",350803");
strcat(ps,",350803");
strcat(e,",350803");
strcat(bt,",350803");
}
if(SuperGuy3 =3D=3D true)
{
strcat(b,",347525");
strcat(ed,",347525");
strcat(ps,",347525");
strcat(e,",347525");
strcat(bt,",347525");
}
if(Cadet =3D=3D true)
{
strcat(ps,",350957");
strcat(e,",350957");
}
aw_string_set (AW_WORLD_BUILD_RIGHT, b);
aw_string_set (AW_WORLD_EMINENT_DOMAIN_RIGHT, ed);
aw_string_set (AW_WORLD_PUBLIC_SPEAKER_RIGHT, ps);
aw_string_set (AW_WORLD_EJECT_RIGHT, e);
aw_string_set (AW_WORLD_BOTS_RIGHT, bt);
}

char* copya (char* t)
{
char* out =3D new char;
for(int C=3D0;t[C] !=3D NULL;C++)
{
out[C] =3D t[C];
}
return out;
}

char* addtext (char* o,char* t)
{
char* out =3D new char;
for(int C =3D StringLength (o) + 1;t[C] !=3D NULL;C++)
{
out[C] =3D t[C];
}
return out;
}

int StringLength (char* t)
{
int Plength;
for(Plength=3D0;t[Plength] !=3D NULL;Plength++);
return Plength;
}

bool CheckString (char* o,char* t)
{
int olength =3D StringLength (o);
int tlength =3D StringLength (t);
int mlength =3D 0;
if(olength =3D=3D tlength)
{
for(int C =3D 0;t[C] !=3D NULL;C++)
{
if(o[C] =3D=3D t[C])
{
mlength++;
}
}
}
if(mlength =3D=3D tlength)
{
return true;
}
else
{
return false;
}
}

------=_NextPart_000_001F_01C2CEE9.DAFEAAE0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2722.900" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Honestly, I just suck at VB.&nbsp; I =
can't even get=20
a VB bot to work.&nbsp; I can do much more in C++.&nbsp; I just can't =
add text=20
to these strings.&nbsp; I'm just making a rights bot which has taken =
five=20
minutes so far, its just that I can't make it add the text.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>"bowen" &lt;</FONT><A=20
href=3D"mailto:thisguyrules at 7k2.4mg.com.ANTISPAM"><FONT face=3DArial=20
size=3D2>thisguyrules at 7k2.4mg.com.ANTISPAM</FONT></A><FONT face=3DArial =
size=3D2>&gt;=20
[View Quote] 0);<BR>&nbsp;aw_int_set (AW_MY_GESTURE, 0);<BR>&nbsp;if (rc =3D =
aw_state_change=20
())<BR>&nbsp;{<BR>&nbsp;&nbsp;cout&lt;&lt;"Unable to change state =
(reason=20
%d)\n"&lt;&lt;rc;<BR>&nbsp;&nbsp;exit (1);<BR>&nbsp;}<BR>&nbsp;//Main =
event=20
loop<BR>&nbsp;&nbsp;while (!aw_wait (-1))<BR>&nbsp;&nbsp;&nbsp;=20
;<BR>&nbsp;//Close Bot<BR>&nbsp;aw_destroy ();<BR>&nbsp;aw_term=20
();<BR>}</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>void handle_avatar_add =
(void)<BR>{<BR>&nbsp;char*=20
name =3D new char;<BR>&nbsp;int session;<BR>&nbsp;name =3D=20
copya(aw_string(AW_AVATAR_NAME));<BR>&nbsp;session =3D=20
aw_int(AW_AVATAR_SESSION);<BR>&nbsp;if(!stricmp(name,"TheMask"))<BR>&nbsp=
;{<BR>&nbsp;&nbsp;aw_whisper(session,"Whisper=20
password to gain rights");<BR>&nbsp;}<BR>&nbsp;else=20
if(!stricmp(name,"Builderz"))<BR>&nbsp;{<BR>&nbsp;&nbsp;aw_whisper(sessio=
n,"Whisper=20
password to gain rights");<BR>&nbsp;}<BR>&nbsp;else=20
if(!stricmp(name,"NelXaga"))<BR>&nbsp;{<BR>&nbsp;&nbsp;aw_whisper(session=
,"Whisper=20
password to gain rights");<BR>&nbsp;}<BR>&nbsp;else=20
if(!stricmp(name,"Cameron999"))<BR>&nbsp;{<BR>&nbsp;&nbsp;aw_whisper(sess=
ion,"Whisper=20
password to gain rights");<BR>&nbsp;}<BR>&nbsp;else=20
if(!stricmp(name,"SuperGuy3"))<BR>&nbsp;{<BR>&nbsp;&nbsp;aw_whisper(sessi=
on,"Whisper=20
password to gain rights");<BR>&nbsp;}<BR>&nbsp;else=20
if(!stricmp(name,"Cadet"))<BR>&nbsp;{<BR>&nbsp;&nbsp;aw_whisper(session,"=
Whisper=20
password to gain rights");<BR>&nbsp;}<BR>}</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>void handle_chat ()<BR>{<BR>&nbsp;char* =
message =3D=20
new char;<BR>&nbsp;char* name =3D new char;<BR>&nbsp;int =
session;<BR>&nbsp;message=20
=3D copya(aw_string(AW_CHAT_MESSAGE));<BR>&nbsp;name =3D=20
copya(aw_string(AW_AVATAR_NAME));<BR>&nbsp;session =3D=20
aw_int(AW_CHAT_SESSION);<BR>&nbsp;if(!stricmp(message,"=B6Noob Hater =
Alpha=20
Boss=B6"))<BR>&nbsp;{<BR>&nbsp;&nbsp;if(!stricmp(name,=20
"TheMask"))<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;TheMask =3D=20
true;<BR>&nbsp;&nbsp;}<BR>&nbsp;}<BR>&nbsp;else =
if(!stricmp(message,"=B6I Will=20
Build Even Though I Say I=20
Won't=B6"))<BR>&nbsp;{<BR>&nbsp;&nbsp;if(!stricmp(name,"Builderz"))<BR>&n=
bsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;Builderz=20
=3D true;<BR>&nbsp;&nbsp;}<BR>&nbsp;}<BR>&nbsp;else =
if(!stricmp(message,"=B6Noob=20
Hater Beta=20
Supreme=B6"))<BR>&nbsp;{<BR>&nbsp;&nbsp;if(!stricmp(name,"NelXaga"))<BR>&=
nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;NelXaga=20
=3D true;<BR>&nbsp;&nbsp;}<BR>&nbsp;}<BR>&nbsp;else =
if(!stricmp(message,"=B6Large=20
Stinky Gorillas Basking In The=20
Sun=B6"))<BR>&nbsp;{<BR>&nbsp;&nbsp;if(!stricmp(name,"Cameron999"))<BR>&n=
bsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;Cameron999=20
=3D true;<BR>&nbsp;&nbsp;}<BR>&nbsp;}<BR>&nbsp;else =
if(!stricmp(message,"=B6Theworld=20
is a dumbass noob using=20
AWHack=B6"))<BR>&nbsp;{<BR>&nbsp;&nbsp;if(!stricmp(name,"SuperGuy3"))<BR>=
&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;SuperGuy3=20
=3D true;<BR>&nbsp;&nbsp;}<BR>&nbsp;}<BR>&nbsp;else =
if(!stricmp(message,"=B6I Had=20
Better Do Well=20
:-P=B6"))<BR>&nbsp;{<BR>&nbsp;&nbsp;if(!stricmp(name,"Cadet"))<BR>&nbsp;&=
nbsp;{<BR>&nbsp;&nbsp;&nbsp;Cadet=20
=3D =
true;<BR>&nbsp;&nbsp;}<BR>&nbsp;}<BR>&nbsp;else<BR>&nbsp;{<BR>&nbsp;&nbsp=
;//Do=20
nothing<BR>&nbsp;}<BR>&nbsp;ProcessRights();<BR>}</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>void handle_avatar_delete =
()<BR>{<BR>&nbsp;char*=20
name =3D new char;<BR>&nbsp;int session;<BR>&nbsp;name =3D=20
copya(aw_string(AW_AVATAR_NAME));<BR>&nbsp;session =3D=20
aw_int(AW_AVATAR_SESSION);<BR>&nbsp;if(!stricmp(name,"TheMask"))<BR>&nbsp=
;{<BR>&nbsp;&nbsp;TheMask=20
=3D false;<BR>&nbsp;}<BR>&nbsp;else=20
if(!stricmp(name,"Builderz"))<BR>&nbsp;{<BR>&nbsp;&nbsp;Builderz =3D=20
false;<BR>&nbsp;}<BR>&nbsp;else=20
if(!stricmp(name,"NelXaga"))<BR>&nbsp;{<BR>&nbsp;&nbsp;NelXaga=3D=20
false;<BR>&nbsp;}<BR>&nbsp;else=20
if(!stricmp(name,"Cameron999"))<BR>&nbsp;{<BR>&nbsp;&nbsp;Cameron999 =3D =

false;<BR>&nbsp;}<BR>&nbsp;else=20
if(!stricmp(name,"SuperGuy3"))<BR>&nbsp;{<BR>&nbsp;&nbsp;SuperGuy3 =3D=20
false;<BR>&nbsp;}<BR>&nbsp;else=20
if(!stricmp(name,"Cadet"))<BR>&nbsp;{<BR>&nbsp;&nbsp;Cadet =3D=20
false;<BR>&nbsp;}<BR>&nbsp;else<BR>&nbsp;{<BR>&nbsp;&nbsp;//Do=20
nothing<BR>&nbsp;}<BR>&nbsp;ProcessRights();<BR>}</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>void =
ProcessRights()<BR>{<BR>&nbsp;char* b =3D new=20
char;<BR>&nbsp;char* ed =3D new char;<BR>&nbsp;char* ps =3D new =
char;<BR>&nbsp;char*=20
e =3D new char;<BR>&nbsp;char* bt =3D new char;<BR>&nbsp;b =3D =
"342836";<BR>&nbsp;ed =3D=20
"342836";<BR>&nbsp;ps =3D "342836";<BR>&nbsp;e =3D "342836";<BR>&nbsp;bt =
=3D=20
"342836";<BR>&nbsp;if(TheMask =3D=3D=20
true)<BR>&nbsp;{<BR>&nbsp;&nbsp;strcat(b,",312237"); =
&lt;b&gt;&lt;-----------=20
None of these=20
work.&lt;/b&gt;<BR>&nbsp;&nbsp;strcat(ed,",312237");<BR>&nbsp;&nbsp;strca=
t(ps,",312237");<BR>&nbsp;&nbsp;strcat(e,",312237");<BR>&nbsp;&nbsp;strca=
t(bt,",312237");<BR>&nbsp;}<BR>&nbsp;if(Builderz=20
=3D=3D=20
true)<BR>&nbsp;{<BR>&nbsp;&nbsp;strcat(b,",92986");<BR>&nbsp;&nbsp;strcat=
(ed,",92986");<BR>&nbsp;&nbsp;strcat(ps,",92986");<BR>&nbsp;&nbsp;strcat(=
e,",92986");<BR>&nbsp;&nbsp;strcat(bt,",92986");<BR>&nbsp;}<BR>&nbsp;if(N=
elXaga=20
=3D=3D=20
true)<BR>&nbsp;{<BR>&nbsp;&nbsp;strcat(b,",337709");<BR>&nbsp;&nbsp;strca=
t(ed,",337709");<BR>&nbsp;&nbsp;strcat(ps,",337709");<BR>&nbsp;&nbsp;strc=
at(e,",337709");<BR>&nbsp;&nbsp;strcat(bt,",337709");<BR>&nbsp;}<BR>&nbsp=
;if(Cameron999=20
=3D=3D=20
true)<BR>&nbsp;{<BR>&nbsp;&nbsp;strcat(b,",350803");<BR>&nbsp;&nbsp;strca=
t(ed,",350803");<BR>&nbsp;&nbsp;strcat(ps,",350803");<BR>&nbsp;&nbsp;strc=
at(e,",350803");<BR>&nbsp;&nbsp;strcat(bt,",350803");<BR>&nbsp;}<BR>&nbsp=
;if(SuperGuy3=20
=3D=3D=20
true)<BR>&nbsp;{<BR>&nbsp;&nbsp;strcat(b,",347525");<BR>&nbsp;&nbsp;strca=
t(ed,",347525");<BR>&nbsp;&nbsp;strcat(ps,",347525");<BR>&nbsp;&nbsp;strc=
at(e,",347525");<BR>&nbsp;&nbsp;strcat(bt,",347525");<BR>&nbsp;}<BR>&nbsp=
;if(Cadet=20
=3D=3D=20
true)<BR>&nbsp;{<BR>&nbsp;&nbsp;strcat(ps,",350957");<BR>&nbsp;&nbsp;strc=
at(e,",350957");<BR>&nbsp;}<BR>&nbsp;aw_string_set=20
(AW_WORLD_BUILD_RIGHT, b);<BR>&nbsp;aw_string_set=20
(AW_WORLD_EMINENT_DOMAIN_RIGHT, ed);<BR>&nbsp;aw_string_set=20
(AW_WORLD_PUBLIC_SPEAKER_RIGHT, ps);<BR>&nbsp;aw_string_set=20
(AW_WORLD_EJECT_RIGHT, e);<BR>&nbsp;aw_string_set (AW_WORLD_BOTS_RIGHT,=20
bt);<BR>}</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>char* copya (char* =
t)<BR>{<BR>&nbsp;char* out =3D new=20
char;<BR>&nbsp;for(int C=3D0;t[C] !=3D =
NULL;C++)<BR>&nbsp;{<BR>&nbsp;&nbsp;out[C] =3D=20
t[C];<BR>&nbsp;}<BR>&nbsp;return out;<BR>}</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>char* addtext (char* o,char* =
t)<BR>{<BR>&nbsp;char*=20
out =3D new char;<BR>&nbsp;for(int C =3D StringLength (o) + 1;t[C] !=3D=20
NULL;C++)<BR>&nbsp;{<BR>&nbsp;&nbsp;out[C] =3D =
t[C];<BR>&nbsp;}<BR>&nbsp;return=20
out;<BR>}</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>int StringLength (char* =
t)<BR>{<BR>&nbsp;int=20
Plength;<BR>&nbsp;for(Plength=3D0;t[Plength] !=3D =
NULL;Plength++);<BR>&nbsp;return=20
Plength;<BR>}</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>bool CheckString (char* o,char*=20
t)<BR>{<BR>&nbsp;int olength =3D StringLength (o);<BR>&nbsp;int tlength =
=3D=20
StringLength (t);<BR>&nbsp;int mlength =3D 0;<BR>&nbsp;if(olength =3D=3D =

tlength)<BR>&nbsp;{<BR>&nbsp;&nbsp;for(int C =3D 0;t[C] !=3D=20
NULL;C++)<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;if(o[C] =3D=3D=20
t[C])<BR>&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;mlength++;<BR>&nb=
sp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;}<BR>&nbsp;}<BR>&nbsp;if(mlength=20
=3D=3D tlength)<BR>&nbsp;{<BR>&nbsp;&nbsp;return=20
true;<BR>&nbsp;}<BR>&nbsp;else<BR>&nbsp;{<BR>&nbsp;&nbsp;return=20
false;<BR>&nbsp;}<BR>}</FONT></DIV></BODY></HTML>

------=_NextPart_000_001F_01C2CEE9.DAFEAAE0--

bowen

Feb 8, 2003, 12:16am
Why not try to actually predefine string length? I'm sure you can make do with 256
or 1024 characters. But then it looks like you're trying to do something weird with
the rights list... I know what Andras means when he says I should comment better
now. ;)

--Bowen--

hal9000

Feb 8, 2003, 1:26am
sprintf(yourstring,"%s%s",yourstring,stringtoadd);
i believe that is right, thuogh it has been awhie since i have done anything
in C++


--
Hal9000
Worlds: Discover, Planets, Revolt76

[View Quote]

bowen

Feb 8, 2003, 1:35am
[View Quote] That's a little silly to do, but ok. It won't change the results of his crash
though. He's trying to do something with the rights list and it's messing up (as far
as I can tell).

--Bowen--

hal9000

Feb 8, 2003, 2:08am
maybe i misunderstand... where is the error happening?

and yes, i believe that AW requires fixed length strings (now that i look at
the code)... You can use whatever you want to begin with, but make sure that
you give it to aw as a fixed length...


--
Hal9000
Worlds: Discover, Planets, Revolt76

[View Quote]

bowen

Feb 8, 2003, 3:02am
[View Quote] It seems to be crashing when it attempts to modify the rights list. (as far as I can
ascertain)

--Bowen--

andras

Feb 8, 2003, 6:47am
[View Quote]
All text variable definition/creation in your example is WRONG.

char *c;
c=new char;
will create a single character pointer but not a string!

char *c;
c=new char[1024];
Will create a 1024 character long string pointed by c.

In your case you probably wanted to use the later one :)

HTH
--
Andras
"It's MY computer" (tm Steve Gibson)

.duo.

Feb 8, 2003, 12:10pm
I've ran the debugger many times, and it crashes as soon as I use the string
functions. I hope what you said will fix my problem.
[View Quote]

bowen

Feb 8, 2003, 2:29pm
[View Quote] I said it in a less direct way. ;) I didn't see that single char stuff though. But
then again you were doing some crazy stuff with your own functions.

--Bowen--

1  2  |  
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