QCherry Posted March 14, 2015 Author Share Posted March 14, 2015 Hi,I have game on EO 3 source, and have a big problem, when adding new shop and click OK server give me this Run-Time error '9'![](http://i.imgur.com/Y56jKT5.png)I debug server and have this![](http://i.imgur.com/xUrXlzj.png?1)( CopyMemory ByVal VarPtr(Shop(shopNum)), ByVal VarPtr(ShopData(0)), ShopSize ) line Link to comment Share on other sites More sharing options...
abhi2011 Posted March 14, 2015 Share Posted March 14, 2015 That happens because the ShopRec in modTypes on the client and server don't match. Make sure both of them are the same. Link to comment Share on other sites More sharing options...
QCherry Posted March 14, 2015 Author Share Posted March 14, 2015 it's same … originally Link to comment Share on other sites More sharing options...
Joyce Posted March 14, 2015 Share Posted March 14, 2015 Are you sure? Because that error really tells us that one of the two is different. :P Link to comment Share on other sites More sharing options...
QCherry Posted March 14, 2015 Author Share Posted March 14, 2015 Look:Client:[http://i.imgur.com/oFbojW3.png](http://i.imgur.com/oFbojW3.png)Server:[http://i.imgur.com/1bgo0eK.png](http://i.imgur.com/1bgo0eK.png) Link to comment Share on other sites More sharing options...
Joyce Posted March 14, 2015 Share Posted March 14, 2015 … Look at TradeItemsRec.That's also part of the shops, and definitely not the same. :P (One uses Bytes, the other uses Longs) Link to comment Share on other sites More sharing options...
abhi2011 Posted March 14, 2015 Share Posted March 14, 2015 ~~Is Name_Length and Max_Trades the same value on the server and client? ~~As Joyce said the variable data types in TradeItemRec are different. Link to comment Share on other sites More sharing options...
QCherry Posted March 14, 2015 Author Share Posted March 14, 2015 I replace TradeItemRec in server this code:```Private Type TradeItemRec Item As Long ItemValue As Long Bonus As Byte Rank As Byte CostItem As Long CostValue As LongEnd Type```And on click Shops editor in admin panel, crash CLIENT debug: frmEditor_Shop.lstTradeItem.AddItem I & ": " & .ItemValue & "x " & Trim$(Item(.Item).Name) & " for " & .CostValue & "x " & Trim$(Item(.CostItem).Name)this line (error runtime 9' subscript out of rage) Link to comment Share on other sites More sharing options...
Joyce Posted March 14, 2015 Share Posted March 14, 2015 Don't change the names of the variables server-side, or you'll need to change them through the entire server code as well. Just change Long into Byte. Link to comment Share on other sites More sharing options...
QCherry Posted March 14, 2015 Author Share Posted March 14, 2015 Okay,I change in server this:```Private Type TradeItemRec Item As Long ItemValue As Long itembonus As Byte ItemRank As Byte costitem As Long costvalue As LongEnd Type```itembonus and itemrank to byte and crashes client same before post Link to comment Share on other sites More sharing options...
Joyce Posted March 14, 2015 Share Posted March 14, 2015 Have you deleted your shops? If you change the format on the server end you'll have to get rid of them. Link to comment Share on other sites More sharing options...
QCherry Posted March 14, 2015 Author Share Posted March 14, 2015 Deleted shops and items, and WORKS :DThanks you and all on this topic!Works totally all - creating etc. 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