2011-04-03, 08:04 AM
2011-04-04, 12:48 PM
(2011-04-02, 08:12 PM)Tom K. Wrote: [ -> ]ok, that seemed to work thanks Now i just have another problem. In the C# code there is:
p.Blockchange += new Player.BlockchangeEventHandler(Blockchange1);
now, player.BlockchangeEventHandles in c# is:
public delegate void BlockchangeEventHandler(Player p, ushort x, ushort y, ushort z, byte type); public event BlockchangeEventHandler Blockchange = null;
In VB.NET that has converted to:
p.Blockchange += New Player.BlockchangeEventHandler(AddressOf Blockchange1)
and in the class:
Public Delegate Sub BlockchangeEventHandler(p As Player, x As UShort, y As UShort, z As UShort, type As Byte) Public Event Blockchange As BlockchangeEventHandler = Nothing
In C# it works fine, in vb.net it gives:
'Public Event Blockchange(p As Player, x As UShort, y As UShort, z As UShort, type As Byte)' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event.
Anyone able to help? Its driving me mad...