index global moho error
Posted: Thu Sep 09, 2021 9:07 am
any body can help?
I get error here
elseif msg == self.SHY then
print(moho.layer)
Code: Select all
-- **************************************************
-- Provide Moho with the name of this script object
-- **************************************************
ScriptName = "daaaaaaaa"
-- **************************************************
-- General information about this script
-- **************************************************
daaaaaaaa = {}
function daaaaaaaa:Name()
return 'daaaaaaaa'
end
function daaaaaaaa:Version()
return '1.0'
end
function daaaaaaaa:UILabel()
return 'daaaaaaaa'
end
function daaaaaaaa:Creator()
return 'daaaaaaaa'
end
function daaaaaaaa:Description()
return ''
end
-- **************************************************
-- Is Relevant / Is Enabled
-- **************************************************
function daaaaaaaa:IsRelevant(moho)
return true
end
function daaaaaaaa:IsEnabled(moho)
return true
end
-- **************************************************
-- Recurring Values
-- **************************************************
daaaaaaaa.name_textControl = 'Default'
daaaaaaaa.Lock_var = false
daaaaaaaa.labelCheck_var = true
daaaaaaaa.shyCheck_var = false
-- **************************************************
-- Keyboard/Mouse Control
-- **************************************************
function daaaaaaaa:OnMouseDown(moho, mouseEvent)
end
-- **************************************************
-- popupDialog1Dialog
-- **************************************************
local popupDialog1Dialog = {}
popupDialog1Dialog.CHANGE = MOHO.MSG_BASE
popupDialog1Dialog.LOCK = MOHO.MSG_BASE + 1
popupDialog1Dialog.LABEL = MOHO.MSG_BASE + 2
popupDialog1Dialog.SHY = MOHO.MSG_BASE + 3
function popupDialog1Dialog:new()
local d = LM.GUI.SimpleDialog('', popupDialog1Dialog)
local l = d:GetLayout()
l:PushH()
d.boneName = LM.GUI.TextControl(100, 'Name', d.CHANGE, LM.GUI.FIELD_TEXT, 'Rename:')
l:AddChild(d.boneName, LM.GUI.ALIGN_LEFT, 0)
d.lockBone = LM.GUI.CheckBox('Lock', d.LOCK)
l:AddChild(d.lockBone, LM.GUI.ALIGN_LEFT, 7)
d.colorMenu = LM.GUI.DynamicText('color:', 0)
l:AddChild(d.colorMenu, LM.GUI.ALIGN_LEFT, 0)
d.menu1Menu = LM.GUI.Menu('plain')
d.menu1Menu_popup = LM.GUI.PopupMenu(120, true)
d.menu1Menu_popup:SetMenu(d.menu1Menu)
d.menu1Menu:AddItem('plain', 0, 0)
l:AddChild(d.menu1Menu_popup, LM.GUI.ALIGN_LEFT, 0)
d.labelCheck = LM.GUI.CheckBox('Label', d.LABEL)
l:AddChild(d.labelCheck, LM.GUI.ALIGN_LEFT, 0)
d.shyCheck = LM.GUI.CheckBox('Shy', d.SHY)
l:AddChild(d.shyCheck, LM.GUI.ALIGN_LEFT, 0)
l:Pop()
return d
end
function popupDialog1Dialog:UpdateWidgets(moho)
self.boneName:SetValue(daaaaaaaa.name_textControl)
self.lockBone:SetValue(daaaaaaaa.Lock_var)
self.labelCheck:SetValue(daaaaaaaa.labelCheck_var)
self.shyCheck:SetValue(daaaaaaaa.shyCheck_var)
end
function popupDialog1Dialog:OnOK(moho)
daaaaaaaa.name_textControl = self.boneName:Value()
daaaaaaaa.Lock_var = self.lockBone:Value()
daaaaaaaa.labelCheck_var = self.labelCheck:Value()
daaaaaaaa.shyCheck_var = self.shyCheck:Value()
end
function popupDialog1Dialog:HandleMessage(msg)
if msg == self.CHANGE then
print('Message CHANGE received')
elseif msg == self.LOCK then
print('Message LOCK received')
elseif msg == self.LABEL then
print('Message LABEL received')
elseif msg == self.SHY then
print(moho.layer)
else
end
end
-- **************************************************
-- Tool Panel Layout
-- **************************************************
function daaaaaaaa:DoLayout(moho, layout)
self.dlog = popupDialog1Dialog:new()
self.popupDialog1Popup = LM.GUI.PopupDialog('Popup Dialog 1', false, 0)
self.popupDialog1Popup:SetDialog(self.dlog)
layout:AddChild(self.popupDialog1Popup, LM.GUI.ALIGN_LEFT, 0)
end
elseif msg == self.SHY then
print(moho.layer)