Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

[Half Solved] New panels are not generating correctly on my inventory system, what's the problem?

Asked by
SCP774 191
6 years ago
Edited 6 years ago

So I've made a massive inventory system that works similar to Murderer Mystery 2's one. It's data transfer and saving part is completed (And tested), but I'm having trouble with the panel generation.

It shows no error and I already debugged it nothing went wrong but a new panel didn't create.

Here's my script:

01wait(2.5)
02local rep = game:GetService("ReplicatedStorage")
03local remote = rep.Remotes:WaitForChild("GetPlayerItemInfoCTC")
04local remote2 = rep.Remotes:WaitForChild("SendPlayerItemInfoEvent")
05local remote3 = rep.Remotes:WaitForChild("InventoryControlEvent")
06local remote4 = rep.Remotes:WaitForChild("CloseAllGuisCTC")
07local frame = script.Parent
08local gui = frame.Parent
09local panelHolder = frame:FindFirstChild("BlankHolder")
10local plr = game.Players.LocalPlayer
11local itemModule = require(rep.Modules.ItemLibrary)
12local contentProvider = game:GetService("ContentProvider")
13 
14local quanityList = {}
15 
View all 67 lines...

For the item library module:

01local module = {}
02 
03local tableOfTier = {
04    ["Starter"] = 1; -- Receive when first joined the game
05    ["Common"] = 2; -- Can be obtained
06    ["Uncommon"] = 3; -- Can be obtained
07    ["Rare"] = 4; -- Can be obtained
08    ["Epic"] = 5; -- Can be obtained
09    ["Legendary"] = 6; -- Easily obtainable from the highest tier boxes
10    ["Mythical"] = 7; -- Insanely rare
11    ["Unobtainable"] = 8; -- The maximum tier you can get in a box
12    ["Exclusive"] = 9; -- Only limited to a group of people
13    ["???"] = 10; -- One in a kind
14 
15    -- Special Tiers
View all 46 lines...

Output: 1 Wood Club Creating information for panel Obtaining information for item Starting Module Information obtained Panel already exists 13:32:03.214 - ContentProvider:PreloadAsync() failed for rbxassetid://2263279249 Ending function 2 Alpha Sword Creating information for panel Obtaining information for item Starting Module Information obtained Creating new panel 13:32:03.748 - ContentProvider:PreloadAsync() failed for rbxassetid://2263279249 Ending function

Edit: I also need help with the ContentProvider preload async, I have no clue why it don't work.

0
There's a chance the assets you're trying to load aren't available for you to use. VisualPlugin 20 — 6y
0
^ Those decals are my decals. SCP774 191 — 6y

1 answer

Log in to vote
1
Answered by 6 years ago

Is it a problem with the panel placement? The panels seem to have been placed improperly. Here's a suggestion on how you can fix it:

1print("Creating information for panel")
2local horizontal = (i - 1) / 4
3local lineNumber = math.floor(horizontal)
4local Coordinate = UDim2.new(0, 135 * horizontal, 0, 135 * lineNumber)

If lineNumber should be an integer value starting from 0, you should consider using the math.floor function.

0
EDIT: Nevermind, it didn't work. I figured out how to fix it myself, thanks for the help anyway. SCP774 191 — 6y
0
Btw I still need help with the ContentProvider PreloadAsync. SCP774 191 — 6y
0
Don't preload the asset's image, preload the Instance itself https://www.robloxdev.com/api-reference/function/ContentProvider/PreloadAsync Vulkarin 581 — 6y
0
I did, still don't work, the decal's owner is my group, and the game is owned by the group which owns the decals. SCP774 191 — 6y
Ad

Answer this question