Sign in to follow this  
SugarCarrot

Mod is crushing in multiplayer

Recommended Posts

SugarCarrot    1

I noticed two bugs while I was playing with my friend in multi (My friend was the host of the server also):

  1. My custom item doesn't want to show (inventory pic and other animation pics), while my friend could see it
  2. When my friend tried to give me custom item, my game crashes with the error "[string "scripts/components/inventotyitem.lua"] :10: attempt to index field 'inventoryitem' (a nil value)"

Just on a note: the string №10 in inventoryitem.lua is 

local function onowner(self, owner)
    self.inst.replica.inventoryitem:SetOwner(owner)
end

I just can't understand what's wrong... Maybe something wrong with animation folders in the first problem? But then what's wrong with the second one?

I haven't seen any topics about that so i'm calling for help!

Here's my mods, because ig maybe here's something wrong with all of them, uhuuuhhh 

mods.zip

Edited by SugarCarrot

Share this post


Link to post
Share on other sites
CarlZalph    4119

There's a lot of details to work with a full server/client instance.

The main driving point is that components generally only exist on the server and the client gets its information through netvars and other networked string fields.

That little snippet there isn't enough to really help you with anything, and I'd recommend uploading the entirety of the mod.

Share this post


Link to post
Share on other sites
SugarCarrot    1
8 hours ago, CarlZalph said:

There's a lot of details to work with a full server/client instance.

The main driving point is that components generally only exist on the server and the client gets its information through netvars and other networked string fields.

That little snippet there isn't enough to really help you with anything, and I'd recommend uploading the entirety of the mod.

Ok, i've upload my mods in this

And oh, i would be really happy if you'll help me, dude...  

Edited by SugarCarrot

Share this post


Link to post
Share on other sites
CarlZalph    4119
9 hours ago, SugarCarrot said:

Ok, i've upload my mods in this

And oh, i would be really happy if you'll help me, dude...  

From a quick scan over the prefabs for components that are being added on clients:

John Lennon/scripts/prefabs/johnglasses.lua

Is the only file missing the important check:

    if not TheWorld.ismastersim then
        return inst
    end

Whether this fixes the issue or not, well you'll have to retest.

The entire stack trace helps pinpoint out the where and what if you have it.

Share this post


Link to post
Share on other sites
SugarCarrot    1
4 hours ago, CarlZalph said:

From a quick scan over the prefabs for components that are being added on clients:

John Lennon/scripts/prefabs/johnglasses.lua

Is the only file missing the important check:


    if not TheWorld.ismastersim then
        return inst
    end

Whether this fixes the issue or not, well you'll have to retest.

The entire stack trace helps pinpoint out the where and what if you have it.

Nope, it still isn't showing, unfortunately 

Log is saying that 

"[00:09:51]: Could not find anim build FROMNUM"

Maybe here's something wrong with the anim folder or the .scml file..? -. _^.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this