Help me please, item Distributions.
1 1

7 posts in this topic

Recommended Posts

I have this code:

Script items:

module example

{
imports
    {
        Base
    }

 

    item item1
    {
        Weight        = 0.5,
        Type        = Normal,
        DisplayName    = this is item1,
        Icon        = item1ico,
        Packaged     = TRUE,
        CantBeFrozen    = False,

    }

}

And this is mi code for Distribution:

require "Items/SuburbsDistributions";
table.insert(SuburbsDistributions["all"]["counter"].items, "example.item1");
table.insert(SuburbsDistributions["all"]["counter"].items, 100);
table.insert(SuburbsDistributions["all"]["fridge"].items, "example.item1");
table.insert(SuburbsDistributions["all"]["fridge"].items, 100);


But, my item no spawn ingame :(

 

Edited by dydimos

Share this post


Link to post
Share on other sites
2 hours ago, TheLeonBM said:

Typo. The module is exemple on the item and example on the distributions.

Aaaah, ok, if I wrote here wrong, sorry ... but it is "example" in both cases.

Edited by dydimos

Share this post


Link to post
Share on other sites
58 minutes ago, TheLeonBM said:

Oh I thought that was how you wrote it in the files, sometimes something as simple as a syntax error can break things.

Where are you putting the files exactly?

sooo I can send you the mod via PM so you can see it clearly, and several have told me that it is written correctly ... maybe your look at something that no one else sees.

Share this post


Link to post
Share on other sites
2 hours ago, TheLeonBM said:

Oh I thought that was how you wrote it in the files, sometimes something as simple as a syntax error can break things.

Where are you putting the files exactly?

Problem solved, the distribution file had been saved as txt and not as lua .... thanks.

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
1 1