ForumsProgramming ForumArmorbot Help

5 4522
ritchie2100
offline
ritchie2100
2 posts
Nomad

I'm trying to add a Armorbot high score table in my game using actionscript 1.0. Everything except the name submission works (only submits blank names) and I don't know what is causing this. I have relooked at my variables several times and don't believe that is the problem.

Any help, please?

  • 5 Replies
soapaintnice
offline
soapaintnice
17 posts
Nomad

You might be able to narrow down the problem to one of two areas in the code:

A) Where the name string is originally given the players name.

B) Where the name is sent to Armorbot.

I would try using the trace function to output the name string. Output the name string just after 'A' and right before 'B'. This would help you narrow down where the problem is.


If your new to actionscript, here's how you call the trace function:

trace(name);


If you still need help, I suggest posting some of the code on here. It would be easier if there was something to look at.

ritchie2100
offline
ritchie2100
2 posts
Nomad

my code currently looks like this;

//Send Highscore AS1.0 // Armor Bot Rankz
function __rankz_send__(par1,par2,par3,par4){
trace(par3);
par227 = new LoadVars();
par228 = new LoadVars();
par227.flashkey = par2;
par227.SU0249 = par1;
par227.bmFtZTE = par3;
par227.c2NvcmUx = par4+"Z";
par227.c2NvcmUx = par227.c2NvcmUx.split("0&quot.join("U"
par227.c2NvcmUx = par227.c2NvcmUx.split("&quot.join("A"
par227.c2NvcmUx = par227.c2NvcmUx.split("AU&quot.join("Y"
par227.c2NvcmUx = par227.c2NvcmUx.split("A1&quot.join("B"
par227.c2NvcmUx = par227.c2NvcmUx.split(".&quot.join("N"
par227.flashkey = par227.flashkey.split("=&quot.join(""
par227.SU0249 = par227.SU0249.split("=&quot.join(""
par228.onLoad = function(success){
if(success){
trace(par228.msg);
}else{
trace(par228.loaded);
}
}
}
trace(_root.myName.text);
bXlnYW1lX25hbWVfdmFyaWFibGU = _root.myName.text;
bXlnYW1lX3Njb3JlX3ZhcmlhYmxl = _root.score;
__rankz_send__("MzM0MGolZSVhJW4lcw==", "ZVNXS2RhalA=", bXlnYW1lX25hbWVfdmFyaWFibGU, bXlnYW1lX3Njb3JlX3ZhcmlhYmxl);

//Send Highscore AS1.0 END

stop();
soapaintnice
offline
soapaintnice
17 posts
Nomad

Well, the code looks fine. I have a theory though:

Are you only setting bXlnYW1lX25hbWVfdmFyaWFibGU with _root.myName.text only once at start up? If so, then _root.myName.text is an empty string to start with. So when you call __rankz_send__, you do so without first setting bXlnYW1lX25hbWVfdmFyaWFibGU with an actual name.

Try encapsulating this section of code

trace(_root.myName.text);
bXlnYW1lX25hbWVfdmFyaWFibGU = _root.myName.text;
bXlnYW1lX3Njb3JlX3ZhcmlhYmxl = _root.score;
__rankz_send__("MzM0MGolZSVhJW4lcw==", "ZVNXS2RhalA=", bXlnYW1lX25hbWVfdmFyaWFibGU, bXlnYW1lX3Njb3JlX3ZhcmlhYmxl);

into a function. Like this:
function submitScore(){
trace(_root.myName.text);
bXlnYW1lX25hbWVfdmFyaWFibGU = _root.myName.text;
bXlnYW1lX3Njb3JlX3ZhcmlhYmxl = _root.score;
__rankz_send__("MzM0MGolZSVhJW4lcw==", "ZVNXS2RhalA=", bXlnYW1lX25hbWVfdmFyaWFibGU, bXlnYW1lX3Njb3JlX3ZhcmlhYmxl);
}

This way, when you call submitScore you'll be setting bXlnYW1lX25hbWVfdmFyaWFibGU with the current name in _root.myName.text every time.

Does that makes sense? I hope that helps.
Sssssnnaakke
offline
Sssssnnaakke
1,036 posts
Scribe

soapaintnice has got it. Checked and returned with care.

Ewokk
offline
Ewokk
4 posts
Nomad

I have the same problem but with actionscript 2.0 :S

My code is

//Send Highscore AS2.0 // Armor Bot Rankz
import ab3.rankz.*;
function __rankz_send__(par1,par2,par3,par4){
par227 = new LoadVars();
par228 = new LoadVars();
par227.flashkey = par2;
par227.SU0249 = par1;
par227.bmFtZTE = Armor_Bot_30_En_AS1.Encode(par3);
par227.c2NvcmUx = Armor_Bot_30_En_AS1.Encode(par4+"j%e%a%n%s"
par227.flashkey = par227.flashkey.split("=&quot.join(""
par227.SU0249 = par227.SU0249.split("=&quot.join(""
par228.onLoad = function(success){
if(success){
trace(par228.msg);
}else{
trace(par228.loaded);
}
}
par227.sendAndLoad("http://rankz.armorbot.com/submit/",par228,"POST"
}
bXlnYW1lX25hbWVfdmFyaWFibGU = name;//replace my_name1_variable with your name variable (1)
bXlnYW1lX3Njb3JlX3ZhcmlhYmxl = score;//replace my_score1_variable with your score1 variable
__rankz_send__("MzY0NGolZSVhJW4lcw==", "UU9XSkxWdmI=", bXlnYW1lX25hbWVfdmFyaWFibGU, bXlnYW1lX3Njb3JlX3ZhcmlhYmxl);
//Send Highscore AS2.0 END

Showing 1-5 of 5