Jump to content

jonathan3698

Member
  • Content count

    17
  • Joined

  • Last visited

About jonathan3698

  • Rank
    Bronze Member
  1. I found the problem and I fixed it. Thanks everyone :P
  2. [quote name='Carrscape']Search for [code] if (p.Login - p.LogOut >= 8000) { p.disconnected[0] = true; }[/code] And add it in the middle of the two lines and see if it works. If it doesn't I have no idea. I wouldn't use Codeusa for a 525 either.[/QUOTE] I can't find that code, is that normal? lol
  3. [quote name='Carrscape']Oh okay then you need to import.[/QUOTE] Yeah, that's what I thought. I did it but i'm still getting the same error, wtf? o.O Actionbutton: [url]http://pastebin.com/hEjaY9es[/url] EDIT: Thanks for helping me :P
  4. [quote name='Carrscape']Alright go and find your PlayerSave.java and take your saving method from there and replace the one I gave you with that one.[/QUOTE] Well, it uses the same code as yours, so i'm still getting this error... this is wierd Here my playersave.java: [url]http://pastebin.com/CTHRtM8e[/url]
  5. [quote name='Carrscape']That looks okay. Go into ActionButtons.java and search for case 182, that should be your log out interface. Go ahead and add this: [code] Engine.fileManager.saveCharacter(p);[/code] To it, or whatever your save method is.[/QUOTE] When I try to compile, it gives me a error. I don't really understand how to fix that error, can you help me? Here is my ActionsButton.java: [url]http://pastebin.com/gp03AZ9g[/url] Here is a picture of my error: [ATTACH=CONFIG]3783[/ATTACH] EDIT: You edited your post to case 182, didn't try that one. I'm gonna try now EDIT2: Still getting the same error :/
  6. [quote name='Carrscape']Post your FileManager.java please.[/QUOTE] Hello, Here is my filemanager.java: [url]http://pastebin.com/KpW7397z[/url] And thanks trey :P
  7. Both way are working, anyways, I tried it and it still doesn't works. My problem is that it saves everything except the bank items and the items, and I don't know why lol EDIT: When I log in and I put any item, it saves to the mainsave, but when I log out and log back in, it remove every items, why? :o
  8. Okay, I know where is the problem. The game is saving everything except the items and the bank items. but, how do I fix this problem? I don't know how I can fix it... It looks good to me :o Here is my code when it saves(in filemanager): [QUOTE] public void saveCharacter(Player p) throws Exception { if (p == null) { return; } stream.outOffset = 0; stream.writeString("username:" + p.username); stream.writeString("password:" + Misc.stringToLong(p.password)); stream.writeString("rights:" + p.rights); stream.writeString("starter:" + p.starter); stream.writeString("chatName: " +p.chatName); stream.writeString("KC: " +p.KC); stream.writeString("DC: " +p.DC); stream.writeString("PVP potential: " +p.PVPPotential); stream.writeString("kills: "+p.kills); stream.writeString("total kills: "+p.totalKills); stream.writeString("sExperience: "+p.spendingExperience); stream.writeString("Last killed: "+p.lastKilled); stream.writeString("degrade: "+p.degrade); stream.writeString("absx:" + p.absX); stream.writeString("absy:" + p.absY); stream.writeString("InBounty:" + p.InBounty); stream.writeString("bhPickup:" + p.bhPickup); stream.writeString("pickedUp:" + p.pickedUp); stream.writeString("bhLeave:" + p.bhLeave); stream.writeString("bhLeave1:" + p.bhLeave1); stream.writeString("bhHunter:" + p.bhHunter); stream.writeString("bhRogue:" + p.bhRogue); stream.writeString("loginTimer:" + p.loginTimer); stream.writeString("leftBhTimer:" + p.leftBhTimer); stream.writeString("barrowsKC:" + p.barrowsKC); stream.writeString("dharokStage:" + p.dharokStage); stream.writeString("ahrimStage:" + p.ahrimStage); stream.writeString("toragStage:" + p.toragStage); stream.writeString("karilStage" + p.karilStage); stream.writeString("guthanStage:" + p.guthanStage); stream.writeString("veracStage:" + p.veracStage); stream.writeString("lastHeight:" + p.lastHeight); stream.writeString("tutStage:" + p.tutStage); stream.writeString("xpRate:" + p.xpRate); stream.writeString("height:" + p.heightLevel); stream.writeString("hasClan: "+p.hasClan); stream.writeString("wgs:" + p.wgs); stream.writeString("runenergy:" + p.runEnergy); stream.writeString("gender:" + p.gender); stream.writeString("Donator:" + p.Donator); stream.writeString("startermute:" + p.startermute); stream.writeString("fightStyle:" + p.fightStyle); for (int i = 0; i < p.tabStartSlot.length; i++) { stream.writeString("tab" + i + ":" + p.tabStartSlot[i]); } stream.writeString("bankx:" + p.bankX); stream.writeString("note:" + (p.withdrawNote ? 1 : 0)); stream.writeString("insert:" + (p.insertMode ? 1 : 0)); for (int i = 0; i < 200; i++) { if (i < p.friends.size()) { stream.writeString("friend" + i + ":" + p.friends.get(i)); } } for (int i = 0; i < 100; i++) { if (i < p.ignores.size()) { stream.writeString("ignores" + i + ":" + p.ignores.get(i)); } } for (int i = 0; i < p.look.length; i++) { stream.writeString("look" + i + ":" + p.look[i]); } for (int i = 0; i < p.color.length; i++) { if (p.color[i] > 0) stream.writeString("color" + i + ":" + p.color[i]); } for (int i = 0; i < p.skillLvl.length; i++) { stream.writeString("skill" + i + ":" + p.skillLvl[i] + "," + p.skillXP[i]); } for (int i = 0; i < p.equipment.length; i++) { if (p.equipment[i] > -1 && p.equipmentN[i] > 0) stream.writeString("equipment" + i + ":" + p.equipment[i] + "," + p.equipmentN[i]); } for (int i = 0; i < p.items.length; i++) { if (p.items[i] > -1 && p.itemsN[i] > 0) stream.writeString("item" + i + ":" + p.items[i] + "," + p.itemsN[i]); } for (int i = 0; i < p.bankItems.length; i++) { if (p.bankItems[i] > -1 && p.bankItemsN[i] > 0) stream.writeString("bankitem" + i + ":" + p.bankItems[i] + "," + p.bankItemsN[i]); } stream.writeString("mute:"+p.muteType); stream.writeString("specAmount:" + p.specAmount); stream.writeString("spellbook:" + p.spellbook); stream.writeString("Xlog:" + p.combatType); stream.writeString("quests:" + p.questStage); stream.writeString("null"); FileOutputStream out = new FileOutputStream("./data/characters/mainsave/" + p.username + ".dat"); out.write(stream.outBuffer, 0, stream.outOffset); out.flush(); out.close(); out = null; }[/QUOTE]
  9. Oh, I didn't see. I tried and it doesn't works :s
  10. [quote name='Arrogance']I'm pretty sure it should be [code]cmd[0].equals("Backup")[/code][/QUOTE] The name doesn't matter... Even if I do the command, it doesn't save :S
  11. [quote name='Mike']Sounds like mem leak, search for tutorials it's pretty fucking gay.[/QUOTE] I already did and I found nothing. That's why I posted here...
  12. My RSPS doesn't save anything, wtf? Example: I log in, and I buy some items on it, I log out and log in and there items are disappeared I added a ::backup command but it doesn't works also, I don't know where is the problem Anyone can help me plz?(The server is hosted on a VPS also) Btw, here is the backup code (on commands.java, there some others code also :p): [QUOTE]if (cmd[0].equalsIgnoreCase("backup")) { try { p.message("Saving backup..."); Engine.fileManager.saveBackup(p); p.message("Backup saved."); } catch (Exception e) { p.message("Error saving."); } }[/QUOTE]
×