Yxxe Posted June 11, 2011 Author Share Posted June 11, 2011 Everything is done now. I would go through the tutorial again and find get all the fixes. Nothing else needs doing with this now, I ripped most of it out of my game in which this system fully works. I've made a server-side cache for pets to stop de-syncing for new clients. I also fixed the Map NPC overwrite, as well as other things. If it doesn't work for you, you've **not** followed the tutorial correctly. (Except in the case where I may have forgotten to add something to the tutorial). The array number moving for pet cache could strain the server, so I suggest writing something faster such as a linked list for it (if you know what one is).@Ryoku: You can stop "fixing" things now. ;)Regards,Lightning Link to comment Share on other sites More sharing options...
RyokuHasu Posted June 11, 2011 Share Posted June 11, 2011 sorry it was soooo tempting to fix it up even better than before XD@RyokuHasu:> I didnt take creadit from you I was taking credit for my fixes, i was saying cite credit for both. Im sorry if you think i was taking all the credit, i just wanted credit for some fixes. =P > > and alot of these fixes did not work before, you didnt rewarp the players to the map in most of the cases, wich is what most of these are, just rewarping the map.> > the pet cleaner part is to help those who were complaining about the pets not getting removed thier game was spammed with "trash pets"> > also if it make you feel any better i removed the cite credit lines. Link to comment Share on other sites More sharing options...
adr990 Posted June 12, 2011 Share Posted June 12, 2011 Ok I sloved the IsPet and PetData problem, but now I've got this:>! ![](http://img708.imageshack.us/img708/8872/petmapcacheerror.png)I removed all NPC's and Map's.(though sometime I need to learn how to use and code a converter..)Edit: My 100th post, yay. eheh Link to comment Share on other sites More sharing options...
Yxxe Posted June 12, 2011 Author Share Posted June 12, 2011 @adr990:> -snip-Have you updated the MapNpc UDT correctly? You must have skipped it as I haven't seen that error since I released this tutorial. :P Link to comment Share on other sites More sharing options...
Zopto Posted June 12, 2011 Share Posted June 12, 2011 ok i know to i am anoying Lightning but may any 1 say me what is problem herehttp://imageshack.us/photo/my-images/21/errorlk.png/For i = 1 To PetMapCache(MapNum).UpperBound on that code say to is error Link to comment Share on other sites More sharing options...
adr990 Posted June 12, 2011 Share Posted June 12, 2011 @Lightning:> Have you updated the MapNpc UDT correctly? You must have skipped it as I haven't seen that error since I released this tutorial. :PWell I added:IsPet As ByteandPetData As PetRec to MapTo 'MapNpcRec'And it went on. .. to the next error.. :PI've got this new problem, I edited my post just after you replied. eheh(About PetMapCache… now I'm lost, heh) Link to comment Share on other sites More sharing options...
Zopto Posted June 12, 2011 Share Posted June 12, 2011 ugh xD :confused: :confused: Link to comment Share on other sites More sharing options...
adr990 Posted June 12, 2011 Share Posted June 12, 2011 Oh it seems we've got the same problem hmp.But no, I have no fix for us. I really can't think of anything this time.. hehEdit:lol @ Ugh Link to comment Share on other sites More sharing options...
Zopto Posted June 12, 2011 Share Posted June 12, 2011 i set all codes good and i server side i finis al codes and that show error i all day try to fix it and noting ugh :SSS Link to comment Share on other sites More sharing options...
Yxxe Posted June 12, 2011 Author Share Posted June 12, 2011 @adr990:> I've got this new problem, I edited my post just after you replied. eheh> (About PetMapCache… now I'm lost, heh)What's the new problem then? :P Link to comment Share on other sites More sharing options...
adr990 Posted June 12, 2011 Share Posted June 12, 2011 Oh, excuse me. ehehI meant that I did update my previous post with my new problem:> Ok I sloved the IsPet and PetData problem, but now I've got this:> > >! ![](http://img708.imageshack.us/img708/8872/petmapcacheerror.png)> > I removed all NPC's and Map's.> (though sometime I need to learn how to use and code a converter..)> > Edit: My 100th post, yay. ehehEh, yea.. this problems really makes me lost, I can't even think of something at the moment.So, the Server compiling is telling me I didn't add the Sub of PetMapCache, or there is something wrong with PetMapCache at my side, but I can't fingure it out..Edit:```Public Type PetCache Pet(1 To MAX_MAP_NPCS) As Long UpperBound As LongEnd TypePublic PetMapCache(1 To MAX_MAPS) As PetCache```I think I've placed that code wrong.I just placed it right after:```'View Current Pets on Map If PetMapCache(Player(Index).Map).UpperBound > 0 Then For j = 1 To PetMapCache(Player(Index).Map).UpperBound Call NPCCache_Create(Index, Player(Index).Map, PetMapCache(Player(Index).Map).Pet(j)) Next End If```Because I thought it should be safe to do so.Maybe I got it wrong there, eh? Link to comment Share on other sites More sharing options...
Yxxe Posted June 12, 2011 Author Share Posted June 12, 2011 lol, put the PetMapCache global call and the PetMapCache type in modGlobals, not in a procedure. xDI also just skimmed through the code and got rid of a few things which would cause an error. (Not for me, for you) ;) Link to comment Share on other sites More sharing options...
adr990 Posted June 12, 2011 Share Posted June 12, 2011 Ah, so there it was supposed to go. Oh my.. I should read more carefully.Thanks for your time and help Lightning. :)> I also just skimmed through the code and got rid of a few things which would cause an error. (Not for me, for you) ;)Ah, I indeed noticed it was touched not to long ago.So, I'll go and re add everything on both Server and Client again?* Or actually, remove some code.. haha Link to comment Share on other sites More sharing options...
Yxxe Posted June 12, 2011 Author Share Posted June 12, 2011 @adr990:> Ah, so there it was supposed to go. Oh my.. I should read more carefully.> > Thanks for your time and help Lightning. :)> Ah, I indeed noticed it was touched not to long ago.> So, I'll go and re add everything on both Server and Client again?> * Or actually, remove some code.. hahaThere should be 3 things that crop up:-DestroyAllParticles(Index)-2 lots of MapNpc[…..]PetData.Leveland yes, you can either comment them out or just delete them. ;] Link to comment Share on other sites More sharing options...
Zopto Posted June 12, 2011 Share Posted June 12, 2011 we hawe same problem Link to comment Share on other sites More sharing options...
Yxxe Posted June 12, 2011 Author Share Posted June 12, 2011 @Zopto:> we hawe same problemRead what I just posted. >:( Link to comment Share on other sites More sharing options...
adr990 Posted June 12, 2011 Share Posted June 12, 2011 I most of time comment thing out, yea, eheh.I'll do that, right now, but.. Oh my, believe it or not..I've got a new error:fixed, replaced j's by i's.. as in tutorial.. somehow that got messed up. Link to comment Share on other sites More sharing options...
adr990 Posted June 12, 2011 Share Posted June 12, 2011 Uh Zopto, read what Lightning just posted:"put the PetMapCache global call and the PetMapCache type in modGlobals, not in a procedure. xD"I placed it wrong too.. *shudders* .. [/ashamed]So this:```Public Type PetCache Pet(1 To MAX_MAP_NPCS) As Long UpperBound As LongEnd TypePublic PetMapCache(1 To MAX_MAPS) As PetCache```Should go in "modGlobals"Edit:Sorry for double post. Link to comment Share on other sites More sharing options...
Zopto Posted June 12, 2011 Share Posted June 12, 2011 @Lightning:> Read what I just posted. >:(O.o ok ok but google translate dont translate good ugh Link to comment Share on other sites More sharing options...
Yxxe Posted June 12, 2011 Author Share Posted June 12, 2011 @adr990: That's just me being a fool and forgetting to add the variable definitions. I'm assuming its in "Sub JoinGame" ;]Place this at the top of "Sub JoinGame"```Dim i As Long, j As Long```That should be it now. If not, it will just be a missing variable definition like I just stated. Pasting that in the sub that is causing the error with PetMapCache should fix it. Link to comment Share on other sites More sharing options...
adr990 Posted June 12, 2011 Share Posted June 12, 2011 Oh I just fingured, and replaced the j's by i's instead of changing the Dim, I didn't see the Dim yet.I'll fix it up the right way this time, eh.And yes, this should fix it. :)-=-Yep, ofcourse it did. hahaGreat man, thanks for helping me through those little mistakes of fail. Link to comment Share on other sites More sharing options...
Zopto Posted June 12, 2011 Share Posted June 12, 2011 tyyy Link to comment Share on other sites More sharing options...
Zopto Posted June 12, 2011 Share Posted June 12, 2011 ok i try leter to set all codes and i hope to now work ty Lightning and adr990 you two are best :DDDD Link to comment Share on other sites More sharing options...
Zopto Posted June 12, 2011 Share Posted June 12, 2011 and sry all for my bed englesh Link to comment Share on other sites More sharing options...
adr990 Posted June 12, 2011 Share Posted June 12, 2011 Heya,edit nvm, figured it out:-=-Also, are there any requirments for the NPC which will be the Pet?Does it need atleast 1hp etc. and every stat 1 etc?Thanks in advance,Adr990 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