My Brave Shine Posted June 16, 2014 Author Share Posted June 16, 2014 Hii Eclipses o/ I have one question.I use (client and server) constants of item = 999.Have 999 slots for itens addition. But, case i use someone weapon over 255 slot in Item Editor, he crash the server and down '-'.it makes my limited game 255 weapons, because above 255, it breaks the server. Can someone explain? or tell me how to increase it?att lovely Link to comment Share on other sites More sharing options...
Matt Posted June 16, 2014 Share Posted June 16, 2014 Sounds like you need to change it from byte to long.```Public Const MAX_ITEMS as Byte = 255 ' change thisPublic Const MAX_ITEMS as Long = 999 ' to this```Remember to do it in the client and server. Link to comment Share on other sites More sharing options...
My Brave Shine Posted June 16, 2014 Author Share Posted June 16, 2014 Thx @Matt , but no is that… i look this, in client and server isPublic Const MAX_ITEMS As Long = 999:/ Link to comment Share on other sites More sharing options...
Domino_ Posted June 16, 2014 Share Posted June 16, 2014 You run your game though vb6 or compiled? MAybe you forgot to compile with long in client or server, so it crashes. Link to comment Share on other sites More sharing options...
My Brave Shine Posted June 16, 2014 Author Share Posted June 16, 2014 no is the case. rs i made the changes correctly. The problem is not that. u.uif the problem is that i have solved more time ago.. y-yboth one and the other are equal .. Link to comment Share on other sites More sharing options...
Matt Posted June 16, 2014 Share Posted June 16, 2014 I'm assuming it's an overflow error, but it might be something else. Can you please tell us what error comes up? Also, run your client/server in VB6, and show us the line that's causing the error. Link to comment Share on other sites More sharing options...
Domino_ Posted June 16, 2014 Share Posted June 16, 2014 Maybe server is not creating more than 255 items in items folder.. Try reload items.What engine do you actually use? Link to comment Share on other sites More sharing options...
My Brave Shine Posted June 17, 2014 Author Share Posted June 17, 2014 Oh Darlings, My server and client has compiled, and more of 50 player comes online normally. The constants of Itens is = 999, as long.Client and Server as compiled perfect. I Create Armor, Consumes, and Other Itens, normally, over 255 Slot. I put 800, 500, etc. to organize my editor. Just functioned fine. BUT, if i create the WEAPON, over 255 slot,ex: I Create the [ Sword of Black Sanctuary ], in slot 256, and i equiped her, and i try Attack one enemy, or interact on Npc, [ if i use Control default Key… ] this comes a cause the over flow in server and crashs down. :XONLY Weapons. ONLY THIS Type… :X other equip or item, or consume, or key.. etc... no have this problem '-' Link to comment Share on other sites More sharing options...
Matt Posted June 17, 2014 Share Posted June 17, 2014 > Also, run your client/server in VB6, and show us the line that's causing the error.Unless you assume we can pinpoint the line of code causing problems in your engine from memory.>! (we can't) Link to comment Share on other sites More sharing options...
My Brave Shine Posted June 17, 2014 Author Share Posted June 17, 2014 Uhm I Use the E. Final Frontier.But, i too can't seach the real problem… rsrs, just work fine.. only this.. is a problem.. in weapon item type... u.uwhy the other equips? armor? shield and etc, work fine, over 256..etc... consumes and other.. spells etc... but just weapons, only hes... i create and use.. but wen i attack, ou interact, or use the control, causes over flow y.y Link to comment Share on other sites More sharing options...
My Brave Shine Posted June 23, 2014 Author Share Posted June 23, 2014 ![](https://fbcdn-sphotos-e-a.akamaihd.net/hphotos-ak-xfp1/t1.0-9/10329059_488248654639477_1264640812244890865_n.jpg)in debug mode this line is apoint :/ is relacioned a experience of "skills" using weapons.. e try delete this.. but become a snowball haha Link to comment Share on other sites More sharing options...
Alerd Posted June 23, 2014 Share Posted June 23, 2014 when you change from Byte to long remember to delete all items Link to comment Share on other sites More sharing options...
Jacquelinett Posted June 23, 2014 Share Posted June 23, 2014 Atleast give us the error message as well?If you have a problem that involve 255 256 that is most likely a data mismatch type. A byte can only hold a value from 0 to 255 as oppose to long negative some super large number to super duper large number.Dont try to delete line, that literally the worst way to fix it.> when you change from Byte to long > > remember to delete all itemsThat is not the case since all items are under the same object class therefore if 255 of them work you really dont have to remove.You are right in some case (when you already have saved object (probably by using serialization) AND you modified the class itself, then yes, you will need to remove all the previous created object OR create a converter for it. However, the base item class in this case is not modified and an outer number used solely for the purpose of numbering is used so removing all of them isn't going to change anythingPlus don't you think it would suck if she have to do another 256 items again? Link to comment Share on other sites More sharing options...
My Brave Shine Posted June 23, 2014 Author Share Posted June 23, 2014 ok, in the case, w i need do? u.u Link to comment Share on other sites More sharing options...
Jacquelinett Posted June 23, 2014 Share Posted June 23, 2014 If you wanna do a teamviewer section where I look over your code I can do that. I mean I have an old copy of vb6 but Im too lazy to go install it.I mean with only your given information I don't think I know where the problem is.The picturePS:OHHHHHHHHHHHHHHH I THINK I KNWO WHERE THE PROBLEM ISIT BECAUSE OF THE PARAMETERchange the parameter from byte to long should solve the problemSince you seem like you are new to coding, the parameter is the stuff u ask for when you call a functionFor examplevoid Givememoney (int howmuch){Character.receiveMoney(howmuch);}so when you call it it would beGivememoney(100);just change the byte to long in that caseif it doesn't work then I don't know that the closest thing I can think of at the moment 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