Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo in Loadstring dependency affecting :ss #1587

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

Mars7383
Copy link
Contributor

When running :ss with a script that has a function using more than 200 local variables, the Loadstring module throws its own error when attempting to format an error stacktrace. This is because the LuaY module tries to access fs.f.linedefined rather than fs.f.lineDefined in the luaY:errorLimit function. Capitalizing the 'D' fixes this, allowing the proper error to be formatted and displayed to the user.

I tested with this script:

local function Deserialize(Class, Properties)
	local Instance_ = Instance.new(Class)
	for Key, Value in pairs(Properties) do
		Instance_[Key] = Value
	end
	return Instance_
end
	
local Example_var = Deserialize('ScreenGui',{DisplayOrder=0,Enabled=true,ResetOnSpawn=true,Name='Example', Parent=game:GetService("StarterGui")})
local Background_var = Deserialize('Frame',{Style=Enum.FrameStyle.Custom,Active=false,AnchorPoint=Vector2.new(0, 0),BackgroundColor3=Color3.new(0.941176, 0.941176, 0.94902),BackgroundTransparency=0,BorderColor3=Color3.new(0, 0, 0),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.12837109, 0, 0.139146566, 0),Rotation=0,Selectable=false,Size=UDim2.new(0, 688, 0, 389),SizeConstraint=Enum.SizeConstraint.RelativeXY,Visible=true,ZIndex=1,Name = 'Background',Parent = Example_var})
local MainContent_var = Deserialize('Frame',{Style=Enum.FrameStyle.Custom,Active=false,AnchorPoint=Vector2.new(0, 0),BackgroundColor3=Color3.new(1, 1, 1),BackgroundTransparency=0,BorderColor3=Color3.new(0, 0, 0),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.138081402, 0, 0.0796915144, 0),Rotation=0,Selectable=false,Size=UDim2.new(0, 497, 0, 198),SizeConstraint=Enum.SizeConstraint.RelativeXY,Visible=true,ZIndex=1,Name = 'MainContent',Parent = Background_var})
local UICorner_var = Deserialize('UICorner', {Name = 'UICorner', Parent = MainContent_var, CornerRadius = UDim.new(0, 8)})
local Title_var = Deserialize('TextLabel',{Font=Enum.Font.SourceSansBold,FontSize=Enum.FontSize.Size14,Text='Example Domain',TextColor3=Color3.new(0, 0, 0),TextScaled=true,TextSize=14,TextStrokeColor3=Color3.new(0, 0, 0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=true,TextXAlignment=Enum.TextXAlignment.Left,TextYAlignment=Enum.TextYAlignment.Center,Active=false,AnchorPoint=Vector2.new(0, 0),BackgroundColor3=Color3.new(1, 1, 1),BackgroundTransparency=0,BorderColor3=Color3.new(0, 0, 0),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.0342052318, 0, 0.157407403, 0),Rotation=0,Selectable=false,Size=UDim2.new(0, 210, 0, 37),SizeConstraint=Enum.SizeConstraint.RelativeXY,Visible=true,ZIndex=1,Name='Title',Parent = MainContent_var})
local Body_var = Deserialize('TextLabel',{Font=Enum.Font.SourceSans,FontSize=Enum.FontSize.Size18,Text='This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.',TextColor3=Color3.new(0, 0, 0),TextScaled=false,TextSize=18,TextStrokeColor3=Color3.new(0, 0, 0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=true,TextXAlignment=Enum.TextXAlignment.Left,TextYAlignment=Enum.TextYAlignment.Top,Active=false,AnchorPoint=Vector2.new(0, 0),BackgroundColor3=Color3.new(1, 1, 1),BackgroundTransparency=0,BorderColor3=Color3.new(0, 0, 0),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.0342052318, 0, 0.428030312, 0),Rotation=0,Selectable=false,Size=UDim2.new(0, 465, 0, 41),SizeConstraint=Enum.SizeConstraint.RelativeXY,Visible=true,ZIndex=1,Name='Body',Parent = MainContent_var})
local Extra_var = Deserialize('TextLabel',{Font=Enum.Font.SourceSans,FontSize=Enum.FontSize.Size18,Text='More information...',TextColor3=Color3.new(0.219608, 0.282353, 0.560784),TextScaled=false,TextSize=18,TextStrokeColor3=Color3.new(0, 0, 0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=true,TextXAlignment=Enum.TextXAlignment.Left,TextYAlignment=Enum.TextYAlignment.Top,Active=false,AnchorPoint=Vector2.new(0, 0),BackgroundColor3=Color3.new(1, 1, 1),BackgroundTransparency=0,BorderColor3=Color3.new(0, 0, 0),BorderSizePixel=0,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.0342052318, 0, 0.690235615, 0),Rotation=0,Selectable=false,Size=UDim2.new(0, 129, 0, 22),SizeConstraint=Enum.SizeConstraint.RelativeXY,Visible=true,ZIndex=1,Name='Extra',Parent = MainContent_var})

--[[ some extra stuff to trigger the 200+ local variables error ]]
local Junk_var = Deserialize('Folder', {Name = 'Junk', Parent = Example_var })
local TextButton_var = Deserialize('TextButton',{Font=Enum.Font.Legacy,FontSize=Enum.FontSize.Size8,Text='Button',TextColor3=Color3.new(0.105882, 0.164706, 0.207843),TextScaled=false,TextSize=8,TextStrokeColor3=Color3.new(0, 0, 0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=Enum.TextXAlignment.Center,TextYAlignment=Enum.TextYAlignment.Center,AutoButtonColor=true,Modal=false,Selected=false,Style=Enum.ButtonStyle.Custom,Active=true,AnchorPoint=Vector2.new(0, 0),BackgroundColor3=Color3.new(0.639216, 0.635294, 0.647059),BackgroundTransparency=0,BorderColor3=Color3.new(0.105882, 0.164706, 0.207843),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0, 0, 0, 0),Rotation=0,Selectable=true,Size=UDim2.new(0, 0, 0, 0),SizeConstraint=Enum.SizeConstraint.RelativeXY,Visible=false,ZIndex=1,Name='TextButton',Parent = Junk_var})
local TextButton_var = Deserialize('TextButton',{Font=Enum.Font.Legacy,FontSize=Enum.FontSize.Size8,Text='Button',TextColor3=Color3.new(0.105882, 0.164706, 0.207843),TextScaled=false,TextSize=8,TextStrokeColor3=Color3.new(0, 0, 0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=Enum.TextXAlignment.Center,TextYAlignment=Enum.TextYAlignment.Center,AutoButtonColor=true,Modal=false,Selected=false,Style=Enum.ButtonStyle.Custom,Active=true,AnchorPoint=Vector2.new(0, 0),BackgroundColor3=Color3.new(0.639216, 0.635294, 0.647059),BackgroundTransparency=0,BorderColor3=Color3.new(0.105882, 0.164706, 0.207843),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0, 0, 0, 0),Rotation=0,Selectable=true,Size=UDim2.new(0, 0, 0, 0),SizeConstraint=Enum.SizeConstraint.RelativeXY,Visible=false,ZIndex=1,Name='TextButton',Parent = Junk_var})
local TextButton_var = Deserialize('TextButton',{Font=Enum.Font.Legacy,FontSize=Enum.FontSize.Size8,Text='Button',TextColor3=Color3.new(0.105882, 0.164706, 0.207843),TextScaled=false,TextSize=8,TextStrokeColor3=Color3.new(0, 0, 0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=Enum.TextXAlignment.Center,TextYAlignment=Enum.TextYAlignment.Center,AutoButtonColor=true,Modal=false,Selected=false,Style=Enum.ButtonStyle.Custom,Active=true,AnchorPoint=Vector2.new(0, 0),BackgroundColor3=Color3.new(0.639216, 0.635294, 0.647059),BackgroundTransparency=0,BorderColor3=Color3.new(0.105882, 0.164706, 0.207843),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0, 0, 0, 0),Rotation=0,Selectable=true,Size=UDim2.new(0, 0, 0, 0),SizeConstraint=Enum.SizeConstraint.RelativeXY,Visible=false,ZIndex=1,Name='TextButton',Parent = Junk_var})
local TextButton_var = Deserialize('TextButton',{Font=Enum.Font.Legacy,FontSize=Enum.FontSize.Size8,Text='Button',TextColor3=Color3.new(0.105882, 0.164706, 0.207843),TextScaled=false,TextSize=8,TextStrokeColor3=Color3.new(0, 0, 0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=Enum.TextXAlignment.Center,TextYAlignment=Enum.TextYAlignment.Center,AutoButtonColor=true,Modal=false,Selected=false,Style=Enum.ButtonStyle.Custom,Active=true,AnchorPoint=Vector2.new(0, 0),BackgroundColor3=Color3.new(0.639216, 0.635294, 0.647059),BackgroundTransparency=0,BorderColor3=Color3.new(0.105882, 0.164706, 0.207843),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0, 0, 0, 0),Rotation=0,Selectable=true,Size=UDim2.new(0, 0, 0, 0),SizeConstraint=Enum.SizeConstraint.RelativeXY,Visible=false,ZIndex=1,Name='TextButton',Parent = Junk_var})
local TextButton_var = Deserialize('TextButton',{Font=Enum.Font.Legacy,FontSize=Enum.FontSize.Size8,Text='Button',TextColor3=Color3.new(0.105882, 0.164706, 0.207843),TextScaled=false,TextSize=8,TextStrokeColor3=Color3.new(0, 0, 0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=Enum.TextXAlignment.Center,TextYAlignment=Enum.TextYAlignment.Center,AutoButtonColor=true,Modal=false,Selected=false,Style=Enum.ButtonStyle.Custom,Active=true,AnchorPoint=Vector2.new(0, 0),BackgroundColor3=Color3.new(0.639216, 0.635294, 0.647059),BackgroundTransparency=0,BorderColor3=Color3.new(0.105882, 0.164706, 0.207843),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0, 0, 0, 0),Rotation=0,Selectable=true,Size=UDim2.new(0, 0, 0, 0),SizeConstraint=Enum.SizeConstraint.RelativeXY,Visible=false,ZIndex=1,Name='TextButton',Parent = Junk_var})
local TextButton_var = Deserialize('TextButton',{Font=Enum.Font.Legacy,FontSize=Enum.FontSize.Size8,Text='Button',TextColor3=Color3.new(0.105882, 0.164706, 0.207843),TextScaled=false,TextSize=8,TextStrokeColor3=Color3.new(0, 0, 0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=Enum.TextXAlignment.Center,TextYAlignment=Enum.TextYAlignment.Center,AutoButtonColor=true,Modal=false,Selected=false,Style=Enum.ButtonStyle.Custom,Active=true,AnchorPoint=Vector2.new(0, 0),BackgroundColor3=Color3.new(0.639216, 0.635294, 0.647059),BackgroundTransparency=0,BorderColor3=Color3.new(0.105882, 0.164706, 0.207843),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0, 0, 0, 0),Rotation=0,Selectable=true,Size=UDim2.new(0, 0, 0, 0),SizeConstraint=Enum.SizeConstraint.RelativeXY,Visible=false,ZIndex=1,Name='TextButton',Parent = Junk_var})
local TextButton_var = Deserialize('TextButton',{Font=Enum.Font.Legacy,FontSize=Enum.FontSize.Size8,Text='Button',TextColor3=Color3.new(0.105882, 0.164706, 0.207843),TextScaled=false,TextSize=8,TextStrokeColor3=Color3.new(0, 0, 0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=Enum.TextXAlignment.Center,TextYAlignment=Enum.TextYAlignment.Center,AutoButtonColor=true,Modal=false,Selected=false,Style=Enum.ButtonStyle.Custom,Active=true,AnchorPoint=Vector2.new(0, 0),BackgroundColor3=Color3.new(0.639216, 0.635294, 0.647059),BackgroundTransparency=0,BorderColor3=Color3.new(0.105882, 0.164706, 0.207843),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0, 0, 0, 0),Rotation=0,Selectable=true,Size=UDim2.new(0, 0, 0, 0),SizeConstraint=Enum.SizeConstraint.RelativeXY,Visible=false,ZIndex=1,Name='TextButton',Parent = Junk_var})
local TextButton_var = Deserialize('TextButton',{Font=Enum.Font.Legacy,FontSize=Enum.FontSize.Size8,Text='Button',TextColor3=Color3.new(0.105882, 0.164706, 0.207843),TextScaled=false,TextSize=8,TextStrokeColor3=Color3.new(0, 0, 0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=Enum.TextXAlignment.Center,TextYAlignment=Enum.TextYAlignment.Center,AutoButtonColor=true,Modal=false,Selected=false,Style=Enum.ButtonStyle.Custom,Active=true,AnchorPoint=Vector2.new(0, 0),BackgroundColor3=Color3.new(0.639216, 0.635294, 0.647059),BackgroundTransparency=0,BorderColor3=Color3.new(0.105882, 0.164706, 0.207843),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0, 0, 0, 0),Rotation=0,Selectable=true,Size=UDim2.new(0, 0, 0, 0),SizeConstraint=Enum.SizeConstraint.RelativeXY,Visible=false,ZIndex=1,Name='TextButton',Parent = Junk_var})
local TextButton_var = Deserialize('TextButton',{Font=Enum.Font.Legacy,FontSize=Enum.FontSize.Size8,Text='Button',TextColor3=Color3.new(0.105882, 0.164706, 0.207843),TextScaled=false,TextSize=8,TextStrokeColor3=Color3.new(0, 0, 0),TextStrokeTransparency=1,TextTransparency=0,TextWrapped=false,TextXAlignment=Enum.TextXAlignment.Center,TextYAlignment=Enum.TextYAlignment.Center,AutoButtonColor=true,Modal=false,Selected=false,Style=Enum.ButtonStyle.Custom,Active=true,AnchorPoint=Vector2.new(0, 0),BackgroundColor3=Color3.new(0.639216, 0.635294, 0.647059),BackgroundTransparency=0,BorderColor3=Color3.new(0.105882, 0.164706, 0.207843),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0, 0, 0, 0),Rotation=0,Selectable=true,Size=UDim2.new(0, 0, 0, 0),SizeConstraint=Enum.SizeConstraint.RelativeXY,Visible=false,ZIndex=1,Name='TextButton',Parent = Junk_var})

for _,v in ipairs(game:GetService("Players"):GetPlayers()) do v:LoadCharacter() end

Proof of functionality:

2024-08-18_11.31.332.mp4

This fixes #1586

@Expertcoderz Expertcoderz added the 🐛 bug Bugs or broken features label Aug 20, 2024
@Dimenpsyonal Dimenpsyonal merged commit 1a0897b into Epix-Incorporated:master Aug 21, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Bugs or broken features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Typo(?) in Loadstring's LuaY
3 participants