Skip to content
View in the app

A better way to browse. Learn more.

WRobot

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Lua not working in fight class editor

Featured Replies

Hey all
I tried to make an in-game frame using lua just the way i would with lua in-game in any other way (macros etc).
So in the "spellname" area in the creator i wrote in my code, and i set it to "not spell, is lua script"
Ending up with this:

      <SpellName>if not FrameCreated then
  FrameCreated = true

    StatusFrame = CreateFrame("Frame")
      StatusFrame:ClearAllPoints()
    StatusFrame:SetBackdrop({bgFile = "Interface\\Buttons\\WHITE8X8",})
    StatusFrame:SetBackdropColor(0,0,0,.4)
    StatusFrame:SetHeight(60)
    StatusFrame:SetWidth(122)
    StatusFrame:SetPoint("TOPLEFT",ChatFrame1, 0,90)
	StatusFrame:SetMovable(true)
	StatusFrame:EnableMouse(true)
	StatusFrame:RegisterForDrag("LeftButton")
	StatusFrame:SetScript("OnDragStart", frame.StartMoving)
	StatusFrame:SetScript("OnDragStop", frame.StopMovingOrSizing)
    StatusFrame:Show()
end</SpellName>


Is there any reason why this does not work?

Note: I did try removing the

StatusFrame:SetBackdrop({bgFile = "Interface\\Buttons\\WHITE8X8",})


In case it just couldn't find the BgFile, no difference. :) Also tried writing it like this:
 

StatusFrame:SetBackdrop({bgFile = [[Interface\Buttons\WHITE8X8]],})

Any help would be appreciated cheers! :)

This is a copy paste from my other post, since i realized that i posted i the wrong forum. :)

Edit: I even tried changing it to use lua script as a condition and then just leave the spellname empty liket his:
 

<LuaScript>if not FrameCreated then
	StatusFrame=CreateFrame("Frame");
	StatusFrame:ClearAllPoints();
	StatusFrame:SetBackdrop({bgFile = "Interface\\Buttons\\WHITE8X8",});
	StatusFrame:SetBackdropColor(0,0,0,.4);
	StatusFrame:SetHeight(60);
	StatusFrame:SetWidth(122);
	StatusFrame:SetPoint("TOPLEFT",ChatFrame1, 0,90);
	StatusFrame:SetMovable(true);
	StatusFrame:EnableMouse(true);
	StatusFrame:RegisterForDrag('LeftButton');
	StatusFrame:SetScript('OnDragStart', frame.StartMoving);
	StatusFrame:SetScript('OnDragStop', frame.StopMovingOrSizing);
	FrameCreated = true
end</LuaScript>

 

  • Author

After hours and hours of doing this and that, i finally figured the error lies within wrobot. Apparently it dones't translate \\ into /
So as soon as i changed

StatusFrame:SetBackdrop({bgFile = "Interface\\Buttons\\WHITE8X8",});

into

StatusFrame:SetBackdrop({bgFile = "Interface/Buttons/WHITE8X8",});

Everything worked.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.