Error while compiling: EditTool.cs(788,35): error CS0029: Cannot implicitly convert type `ulong' to `ItemId'
Compile errorFixed
i have the same mistake, what can i change this time? 😉
Change Line 779 from container.uid = Net.sv.TakeUID(); to container.uid = new ItemContainerId(Net.sv.TakeUID());
Change Line 788 from item.uid = Net.sv.TakeUID(); to item.uid = new ItemId(Net.sv.TakeUID());
Change Line 651 from netWrite.UInt32(selectedEntity.net.ID); to netWrite.UInt64(selectedEntity.net.ID.Value);
Change Line 588 from netWrite.UInt32(selectedEntity.net.ID); to netWrite.UInt64(selectedEntity.net.ID.Value);
That worked thank you very much and have a nice weekend 👍
Thank you!
private void SetupItemContainerIDs(ItemContainer container)
{
container.uid = ItemContainerId(Net.sv.TakeUID());
foreach (Item item in container.itemList)
{
SetupItem(item);
}
}
private void SetupItem(Item item)
{
item.uid = ItemId(Net.sv.TakeUID());
if (item.contents != null)
{
SetupItemContainerIDs(item.contents);
}
foreach (ItemMod mod in item.info.itemMods)
{
mod.OnItemCreated(item);
}is it correct?
Merged post
oh now i got it XD need to put "new"
Just posted a fix for this. Let me know if this works for you.
Locked automatically