Thread

Help Needed: Bot can't login? (Sdk)

Help Needed: Bot can't login? // Sdk

1  |  

elias israel

Dec 15, 1998, 4:07pm
I'm trying to put together a simple 'bot using the sdk. Everything seems
fine, but login attempts keep coming back as rc=43 (password incorrect).
I've double checked the citizen number and the privilege password, and both
seem to be right. Is there some other reason why the bot wouldn't be able to
log in?

Oh, I'm using SDK build 10 and Metrowerks CodeWarrior C++ on Windows NT 4.0
(sp3) in case that makes any difference.


Thanks,

Elias Israel
eli at promanage-inc.com

edward sumerfield

Dec 15, 1998, 4:11pm
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
What you are doing sounds right. Can you post your code?
[View Quote]

elias israel

Dec 15, 1998, 4:26pm
This is a multi-part message in MIME format.

------=_NextPart_000_000A_01BE282E.7A6441B0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


Here's a snippet. Because this is all C++ code, there isn't a simple =
code flow that you can follow as in the SDK sample programs provided on =
the activeworlds web page. Modularity is nice, said an old professor of =
mine, but it has a habit of using up lots of paper.



bool Robot::Create(void)
{
int rc;
=20
rc =3D aw_create(universe_name, universe_port, &instanceID);

return (rc =3D=3D 0);
}

bool Robot::Login(void)
{
int rc;

cout << "Login Name =3D " << login_name << "\n";
cout << "Login Owner =3D " << login_owner << "\n";
cout << "Login Password =3D " << login_passwd << "\n";
=20
aw_string_set(AW_LOGIN_NAME, login_name);
aw_int_set(AW_LOGIN_OWNER, login_owner);
aw_string_set(AW_LOGIN_PASSWORD, login_passwd);
aw_string_set(AW_LOGIN_APPLICATION, "Benjamin Sample SDK Bot");
rc =3D aw_login();
=20
cout << "Login Result =3D " << rc << "\n";

return (rc =3D=3D 0);
}

When Login is run, it prints:

Login Name =3D GreetBot
Login Owner =3D 291967
Login Password =3D XXXXXXXX
Login Result =3D 43

(I've intentionally hidden the password above.)

Eli
[View Quote] I'm trying to put together a simple 'bot using the sdk. =
Everything seems=20
fine, but login attempts keep coming back as rc=3D43 (password =
incorrect).=20
I've double checked the citizen number and the privilege =
password, and both=20
seem to be right. Is there some other reason why the bot =
wouldn't be able to=20
log in?=20
Oh, I'm using SDK build 10 and Metrowerks CodeWarrior C++ on =
Windows NT 4.0=20
(sp3) in case that makes any difference.=20

Thanks,=20

Elias Israel=20
eli at promanage-inc.com


------=_NextPart_000_000A_01BE282E.7A6441B0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type><!doctype html public "-//w3c//dtd html 4.0 =
transitional//en">
<META content=3D'"MSHTML 4.72.2106.6"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>Here's a snippet. Because this is =
all C++ code,=20
there isn't a simple code flow that you can follow as in the SDK sample =
programs=20
provided on the activeworlds web page. Modularity is nice, said an old =
professor=20
of mine, but it has a habit of using up lots of paper.</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>bool=20
Robot::Create(void)<BR>{<BR>&nbsp;&nbsp;&nbsp; int =
rc;<BR>&nbsp;&nbsp;&nbsp;=20
<BR>&nbsp;rc =3D aw_create(universe_name, universe_port,=20
&amp;instanceID);</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>&nbsp;return (rc =3D=3D =
0);</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>}</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>bool=20
Robot::Login(void)<BR>{<BR>&nbsp;&nbsp;&nbsp; int rc;</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>&nbsp;&nbsp;&nbsp; cout &lt;&lt; =
&quot;Login=20
Name =3D &quot; &lt;&lt; login_name &lt;&lt; =
&quot;\n&quot;;<BR>&nbsp;&nbsp;&nbsp;=20
cout &lt;&lt; &quot;Login Owner =3D &quot; &lt;&lt; login_owner &lt;&lt; =

&quot;\n&quot;;<BR>&nbsp;&nbsp;&nbsp; cout &lt;&lt; &quot;Login Password =
=3D=20
&quot; &lt;&lt; login_passwd &lt;&lt; =
&quot;\n&quot;;<BR>&nbsp;&nbsp;&nbsp;=20
<BR>&nbsp;aw_string_set(AW_LOGIN_NAME,=20
login_name);<BR>&nbsp;aw_int_set(AW_LOGIN_OWNER,=20
login_owner);<BR>&nbsp;aw_string_set(AW_LOGIN_PASSWORD,=20
login_passwd);<BR>&nbsp;aw_string_set(AW_LOGIN_APPLICATION, =
&quot;Benjamin=20
Sample SDK Bot&quot;);<BR>&nbsp;rc =3D =
aw_login();<BR>&nbsp;<BR>&nbsp;cout=20
&lt;&lt; &quot;Login Result =3D &quot; &lt;&lt; rc &lt;&lt;=20
&quot;\n&quot;;</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>&nbsp;return (rc =3D=3D =
0);<BR>}<BR></FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>When Login is run, it =
prints:</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>Login Name =3D GreetBot</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>Login Owner =3D 291967</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>Login Password =3D =
XXXXXXXX</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>Login Result =3D 43</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>(I've intentionally hidden the =
password=20
above.)</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>Eli</FONT></DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 solid 2px; MARGIN-LEFT: 5px; PADDING-LEFT: =
5px">
[View Quote] =
href=3D"mailto:3676A659.FB725736 at poboxes.com">3676A659.FB725736 at poboxes.c=
om</A>&gt;...</DIV>What=20
you are doing sounds right. Can you post your code?=20
[View Quote] ------=_NextPart_000_000A_01BE282E.7A6441B0--

elias israel

Dec 15, 1998, 4:36pm
This is a multi-part message in MIME format.

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

Aaah!!!

Of course, I had to post it to find the bug...

Where it says AW_LOGIN_PASSWORD below, it should say =
AW_LOGIN_PRIVILEGE_PASSWORD instead!

Thanks, all.

Eli
[View Quote] I'm trying to put together a simple 'bot using the sdk. =
Everything seems=20
fine, but login attempts keep coming back as rc=3D43 =
(password incorrect).=20
I've double checked the citizen number and the privilege =
password, and both=20
seem to be right. Is there some other reason why the bot =
wouldn't be able to=20
log in?=20
Oh, I'm using SDK build 10 and Metrowerks CodeWarrior C++ on =
Windows NT 4.0=20
(sp3) in case that makes any difference.=20

Thanks,=20

Elias Israel=20
eli at promanage-inc.com


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

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type><!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 =
HTML//EN"><!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<META content=3D'"MSHTML 4.72.2106.6"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 size=3D2>Aaah!!!</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Of course, I had to post it to find the =
bug...</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Where it says AW_LOGIN_PASSWORD below, it should say =

AW_LOGIN_PRIVILEGE_PASSWORD instead!</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Thanks, all.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Eli</FONT></DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 solid 2px; MARGIN-LEFT: 5px; PADDING-LEFT: =
5px">
[View Quote] ------=_NextPart_000_0059_01BE282F.ED7B3040--

edward sumerfield

Dec 15, 1998, 4:40pm
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<body bgcolor="#FFFFFF">
All my stuff is C++ as well so that is cool, though I disagree with your
professor. OO code generally has far less duplication.
<p>Did you do an aw_init(AW_BUILD) before your aw_create?
<br>I don't see your declarations, I assume login_owner is an int?
<br>Did you check the bool result from Robot::Create? What was that error
code?
<br><font color="#000000"><font size=-1>AW_LOGIN_PASSWORD should be AW_LOGIN_PRIVILEGE_PASSWORD.
&lt;&lt;&lt; This looks like the big one.</font></font>
<br>Use endl instead of "\n" as in cout &lt;&lt; "Hello world" &lt;&lt;
endl;
<br>Suggest using Argv, argc for number and password and passing as parameters
to the bot.
<br>&nbsp;
[View Quote] </body>
</html>

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