As usual I'm full of pickles. But this one I actually went dip into the cookie jar, and still couldn't find my solution. Here is the deal:
My buddy list was working just fine using its "basic mode", but then I decided to swap to a more robust scenario since I was in need for persistent off-line variables, but at the same time I didn't want my application to work using Buddy requests or mutual add. So this is how I ended up setting up my zone:
Code: Select all
<Zone name="Ederon Server 1" uCountUpdate="false" maxUsers="4000" customLogin="false">
<BuddyList active="true">
<size>50</size>
<maxBuddyVariables>6</maxBuddyVariables>
<mode>advanced</mode>
<addBuddyPermission>false</addBuddyPermission>
<offLineBuddyVariables>true</offLineBuddyVariables>
<mutualAddBuddy>false</mutualAddBuddy>
<mutualRemoveBuddy>false</mutualRemoveBuddy>
</BuddyList>
....
</Zone>
Then on the actionscript, I've made sure I was working with off-line variables:
Code: Select all
var bVars:Object = new Object();
bVars.$picture = _root.myPicture;
bVars.$level = _root.myLevel;
bVars.$accType = _root.accType;
bVars.$clan = _root.clan;
bVars.inGame = 0;
smartfox.setBuddyVariables(bVars);
Everything looked just good, including the responses from debug, but for some reason, the buddy list was not being saved. Here are the responses from the server.
Attempt to save the buddy:
Code: Select all
[Sending]: <msg t='sys'><body action='addB' r='-1'><n>Mistermind</n></body></msg>
[Received]: <msg t="sys"><body action="bAdd" r="-1"><b s="1" i="98"><n>Mistermind</n><vs><v n="$picture">77.jpg</v><v n="$level">2</v><v n="inGame">0</v><v n="$accType">advanced</v><v n="$clan">Knights of Shadow</v></vs></b></body></msg>
Attempt to login again and retrieve the buddy list:
Code: Select all
[Sending]: <msg t='sys'><body action='loadB' r='-1'></body></msg>
[Received]: <msg t="sys"><body action="bList" r="-1"><bList /></body></msg>
After all that, I actually tried the adv buddy list 2.0 (Examples\AS2\24_pro_buddyList2) to see if that one worked. And it worked! I started then narrowing down the possibilities and the only possible explanation I got so far was the way the variables on config.xml are setted. I mean the variables on Ederon Server 1 on buddy list are advanced only to hold down offline variables while buddy list 2.0 has the permission request feature. But then I went to server log and saw these errors coming out:
Code: Select all
2008/03/07 00:15:10.078 - [ SEVERE ] [id: 34] (DbManager.executeQuery): DbManager error during query/result creation: SELECT OWNER FROM BLIST_456465726F6E205365727665722031 WHERE OWNER='Poia'
2008/03/07 00:15:10.250 - [ SEVERE ] [id: 34] (DbManager.executeCommand): DbManager error during command execution: INSERT INTO BLIST_456465726F6E205365727665722031 VALUES('Poia','Mistermind','0','$picture$levelinGame$accType$clan','41.jpg50advancedKnights of Shadow')
2008/03/07 00:15:10.281 - [ SEVERE ] [id: 34] (DbManager.executeQuery): DbManager error during query/result creation: SELECT OWNER FROM BLIST_456465726F6E205365727665722031 WHERE OWNER='Mistermind'
2008/03/07 00:15:10.375 - [ SEVERE ] [id: 34] (DbManager.executeCommand): DbManager error during command execution: INSERT INTO BLIST_456465726F6E205365727665722031 VALUES('Mistermind','','','$picture$levelinGame$accType$clan','77.jpg20advancedKnights of Shadow')
As far as I could tell my requests couldn't even create the links to hold the buddies database, but since the code seems good and I'm not receiving bugs from the debug I don't think the problem lies anywhere there.
The database bugs didn't seem to have any query string problem, and since the buddy list 2.0 is working on the same server, it doesn't make much sense on where the bug is at really.
So I ask you: Any ideas?