DnC Games Posted April 27, 2011 Author Share Posted April 27, 2011 ok here is some code that is all server side it adds an item give system to the server like the pic belowbut when i go to use it it give me an error but still compileRTE: 13type mismatchthis is in debug mode[![](http://img27.imageshack.us/img27/9027/errorrq.png)](http://img27.imageshack.us/i/errorrq.png/)```Private Sub scrlGivePlayerItem_Change()myLblItemNum.Caption = "Item: " & scrlGivePlayerItem.ValueEnd Sub``````Private Sub scrlMyItemAmount_Change()myLblitemAmmount.Caption = "Amount: " & scrlMyItemAmount.ValueEnd Sub``````Private Sub cmdGivePlayerItem_Click()Dim PlayerName4Item As StringDim PlayerSpecialItem As ByteDim PlayerSpecialAmount As BytetxtPlayersNameForItem.Text = PlayerName4ItemscrlGivePlayerItem.Value = PlayerSpecialItemscrlMyItemAmount.Value = PlayerSpecialAmountCall GiveInvItem(PlayerName4Item, PlayerSpecialItem, PlayerSpecialAmount, True)End Sub```and this is what the server window looks like[![](http://img9.imageshack.us/img9/8059/serverlook.png)](http://img9.imageshack.us/i/serverlook.png/)so if any one can tell me how to fix this that would be great thanks Link to comment Share on other sites More sharing options...
Robin Posted April 27, 2011 Share Posted April 27, 2011 Use Long, not Byte. Mismatch means your data types don't match up. Link to comment Share on other sites More sharing options...
DnC Games Posted April 27, 2011 Author Share Posted April 27, 2011 i changed the byte to long like this and i still get the same mismatch error 13```Private Sub cmdGivePlayerItem_Click()Dim PlayerName4Item As StringDim PlayerSpecialItem As LongDim PlayerSpecialAmount As LongtxtPlayersNameForItem.Text = PlayerName4ItemscrlGivePlayerItem.Value = PlayerSpecialItemscrlMyItemAmount.Value = PlayerSpecialAmountCall GiveInvItem(PlayerName4Item, PlayerSpecialItem, PlayerSpecialAmount, True)End Sub```please someone help me Link to comment Share on other sites More sharing options...
Robin Posted April 27, 2011 Share Posted April 27, 2011 'PlayerName4Item'.What's that? The name of the character? If so, you can't do that. The functions are done through the INDEX, not the name.Need to run it through 'FindPlayer'. Link to comment Share on other sites More sharing options...
DnC Games Posted April 28, 2011 Author Share Posted April 28, 2011 thanks robin that helped me alot i got it working now 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