Slasheree Posted December 10, 2012 Author Share Posted December 10, 2012 can someone give me the logic (which functions/handledata i'll need) for making this possible (not a tutorial, just the basic lines)I tried adding accountname_1.ini accountname_2.ini and accountname_3.ini, but then it messes up the saveplayer() loadplayer() and bank and more stuff, is there an easier way of doing it that I'm not seeing ? O.o[Edit]I'm using CS:DE btw Link to comment Share on other sites More sharing options...
abhi2011 Posted December 11, 2012 Share Posted December 11, 2012 I tried this but failed ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png)But this was the logic I had in mind.Use a rec that holds the main player files. Then a Player rec that holds the characters data. The Player rec can be only accessed from the main rec. The player files are saved in their own folders in \accounts\ Within the player folder is a Main file. It holds the players name and stuff. Then along with the main. 1….# files that holds the characters data. (# being the character number, like 1 for chara 1 etc) Link to comment Share on other sites More sharing options...
TorenRenne Posted December 11, 2012 Share Posted December 11, 2012 I have added this to my engine and once you get the understanding down its relatively easy.I'm not going to spell it out completely for you as that would defeat the point of learning the engine and coding it your own way (plus I have no idea how efficient mine is.)You will need:A Character Rec - Holds all the Character detailsAn edited Player Rec - Which only holds the account details (It will also use the Character rec)An edited TempPlayer Rec - You need a way to store the current character a player is using.You need to alter nearly every single line of code involving a player on the server.The client does not really need to change much. Link to comment Share on other sites More sharing options...
Slasheree Posted December 11, 2012 Author Share Posted December 11, 2012 TorenRenne, could you give me your Sub ClearPlayer() to check something ? ._.When I try to register an account it give a runtime error 9 subscript out of range and highlights:Function GetPlayerMap(ByVal Index As Long) As LongIf Index <= 0 Or Index > MAX_PLAYERS Then Exit FunctionGetPlayerMap = Player(Index).Char(TempPlayer(Index).CurChar).MapEnd Function Link to comment Share on other sites More sharing options...
JohnPony Posted December 11, 2012 Share Posted December 11, 2012 This question has been asked so many times, and yet again I'll reply, RIP IT OUT OF MIRAGE.Regards,GP Link to comment Share on other sites More sharing options...
Slasheree Posted December 11, 2012 Author Share Posted December 11, 2012 i'm trying to rip from Eclipse Dawn… Link to comment Share on other sites More sharing options...
Wortel Angels Posted December 11, 2012 Share Posted December 11, 2012 Slasher thats error did i got too some times but idk anymore what i changedlook where the error is and then take a view at the sub which handle it Link to comment Share on other sites More sharing options...
tslusny Posted December 11, 2012 Share Posted December 11, 2012 it is calling it from sub join game imo, and maybe it is throwing error becouse .curchar is zero. Link to comment Share on other sites More sharing options...
Slasheree Posted December 11, 2012 Author Share Posted December 11, 2012 Ok, fixed it, needed a check:Function GetPlayerMap(ByVal Index As Long) As LongIf TempPlayer(Index).CurChar <= 0 Then Exit FunctionIf Index <= 0 Or Index > MAX_PLAYERS Then Exit FunctionGetPlayerMap = Player(Index).Char(TempPlayer(Index).CurChar).MapEnd FunctionSome minor tweaks to the code and done ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png) (ToDo: Gonna add a confimation thingy for Char Delete) Link to comment Share on other sites More sharing options...
TorenRenne Posted December 11, 2012 Share Posted December 11, 2012 That should never be hit.If your "Getting a Player map", the player has to be in game as checked by:"If Index <= 0 Or Index > MAX_PLAYERS Then Exit Function"The problem your experiencing is down to the fact you are trying to use an account that probably existed BEFORE you added multiple chars?You have to wipe all accounts to implement this. Link to comment Share on other sites More sharing options...
Slasheree Posted December 11, 2012 Author Share Posted December 11, 2012 everything is working fine (I always deleted the accounts even when I made the smallest changes) Link to comment Share on other sites More sharing options...
TorenRenne Posted December 11, 2012 Share Posted December 11, 2012 Well I'm shocked your calling that Function when registering an account. Very odd. Link to comment Share on other sites More sharing options...
Ganjika Posted December 16, 2012 Share Posted December 16, 2012 You guys should put out a tutorial for this since a lot of folks seem to ask about this type of functionality from time to time. Link to comment Share on other sites More sharing options...
Wortel Angels Posted December 16, 2012 Share Posted December 16, 2012 The reason why no one make an tutorial is that the peoples should and CAN learn vb6 then is there Eclipse Dawn and Mirage which got that system and there can it be ripped out…If you know the VB6 Basics and got a bit time you can easy rip it ;-) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now