nibProfileLoader
Im currently trying to set up a UI that has two totally different layouts for a tank and a healer. What I have used so far is Reflux and nibprofileloader. What I want to see if I can do is rework nibprofileloader to instead of asking this.....
New Character detected. Would you like to load profile xxxx? --- Yes --- --- No ---- I want it two have different answers like this.. Thanks for using xxxx UI. Please select a UI layout from options below. ---Tank --- --- Healer --- Basically what nib does is if you press YES it will load a predetermined profile and if you press no it cancels out and closes the window. What I need it to do is where the Yes button is will load a tank profile and where No button is load Heal profile. Hope someone understands this and can help!! |
I've never heard of nibProfileLoader, but you could probably write something like that very easily for Reflux. You would need to read a list of Reflux profiles, and add a button for each one.
If you want more specific help, you will need to post your code and describe what you want to change, and what you have already tried. |
Here is the code from the addon I am using. I want an option to load two different profiles instead of just one. Right now the choices are load one profile or exit with the No button. Just a Yes or No button is currently there and I want like I descirbed in original post..
Lua Code:
|
This should work for you, not tested as I dont use reflux or nibProfileLoader.
Lua Code:
|
Oh sweet I will try this ASAP. The problem I have is I dont know how to code and did not know how the buttons worked. Couldnt figure that part out. Ill see how this goes and will let you know.
|
Ok I tried this modification and it does not do anything. After selecting Tank or Heal the window cancels and nothing happens. No profile switch or reloadui. Trying to see what I can find out. Im not getting any errors or anything. Just not doing what its intended to do.
|
There were some quotes missing around Tank and Heal, but rest should be good.
Lua Code:
|
Ah that was it and now its working. I still do not know how the addon knows what button is hit but anyhow its working. I really wanna learn this stuff but I had no idea where to begin.
Thanks again all. Now its working with 2 profiles. |
Also I changed this line....
local NewProfile = UseClassProfiles and ClassProfiles[class] or ProfileName to this... local NewProfile = UseClassProfiles and ClassProfiles[class] or TankName and also for healer one... local NewProfile = UseClassProfiles and ClassProfiles[class] or HealName Not sure if that was needed but its still working with no errors. |
All done through WoW's PopupDialog API.
Lua Code:
Quote:
|
Thank you very much for adding those comments. Now I got a better understanding how it works. Heck yeah! I learned something today :)
|
Code:
local frame = CreateFrame("FRAME"); Code:
Interface\AddOns\nibProfileLoader\nibProfileLoader.lua:70: '}' expected (to close '{' at line 68) near 'you' <-Lua Nub/Greenhorn |
Line 70 is
Lua Code:
Strings should be put in '' or "" ... and no clue what your [#] is meant to be :) |
changed what you said so now it is like this
Code:
local frame = CreateFrame("FRAME"); Code:
Message: Interface\AddOns\nibProfileLoader\nibProfileLoader.lua:70: '}' expected (to close '{' at line 68) near '[' |
skip [1][2][3] ... those brackets make no sense at all :)
|
Lua Code:
|
cant get it pasted the code from nib into NibProfileLoader.lua and i still get this error :
Code:
Interface\AddOns\nibProfileLoader\nibProfileLoader.lua:85: '}' expected (to close '{' at line 68) near 'OnCancel' |
The one I have works just fine. I do see something different with yours and let me try and explain this since I am a noob at all this coding :)
Line 54: Lua Code:
This is different than mine. Mine reads like this. Lua Code:
Now I think the reason your might not be working is this local thing that is making NewProfile like on line 53: Lua Code:
So change DeeUi-DPS to NewProfile and see if that works |
Yeah, I missed that one. If using straight text as a variable, please enclose it in quotes.
|
Any chance we can update your addon nib or can I upload this modified one? I think there were some players asking about this before on these boards. On how to swap between multiple profiles.
|
All times are GMT -6. The time now is 12:28 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI