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

[Lua Error] Attempt to index field 'scrollFrame' #4

Open
F-Lambda opened this issue Oct 14, 2024 · 1 comment
Open

[Lua Error] Attempt to index field 'scrollFrame' #4

F-Lambda opened this issue Oct 14, 2024 · 1 comment

Comments

@F-Lambda
Copy link

Getting the following Lua error:

Message: [string "OnlineFrameSlider:OnValueChanged"]:1: attempt to index field 'scrollFrame' (a nil value)
Time: 10/13/24 21:43:34
Count: 1
Stack: [string "*:OnValueChanged"]:1: in function <[string "*:OnValueChanged"]:1>

Locals: self = OnlineFrameSlider {
 0 = <userdata>
}
value = 0
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to index field 'scrollFrame' (a nil value)"

The error seems to be in OnlineFrame.xml, line 249:

			<Scripts>
				<OnLoad>
					OnlineFrame.slider = self;
				</OnLoad>
				<OnValueChanged>
					OnlineFrame.scrollFrame:SetVerticalScroll(self:GetValue());
				</OnValueChanged>
			</Scripts>
@dedahr
Copy link

dedahr commented Oct 14, 2024

I solve it with :

<OnValueChanged>
          if (OnlineFrame.scrollFrame ~= nil) then
            OnlineFrame.scrollFrame:SetVerticalScroll(self:GetValue());
          end
</OnValueChanged>

Also got similar message in StrategyFrame.xml so did same medicine in that file:

<Scripts>
	<OnValueChanged>
	       if (self.scrollFrame ~= nil) then
	           self.scrollFrame:SetVerticalScroll(self:GetValue());
	       end
	</OnValueChanged>
</Scripts>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants