Just a note to 21:10 : actually "if not b then ... end" will execute "..." when b is nil OR false (a boolean value). Also note: in LUA 0 (numeric zero), "" (empty string) and empty table -- all considered to be true (and "..." will be executed).
Thanks for the videos. They are very good. For the people looking at it and getting confused by "not b" I have the following suggestion: Try to read it. substitute nil for b and read it left right. 1. if (not b) then b = 1000 end. Reading it if (not nil) then b = 1000 end that seems to mean b will stay nil. Well do this instead. It says what it means. 2. if (b == nil) then b = 1000 end Reading it if ( nil equals nil ) then b = 1000 end Both of these work but since the second one means what it says and doesn't take a convoluted explanation to understand, I would always do it the second way. This would make my addon easier for me or anyone else to figure out.
Great videos! Please, consider updating them for the latest stuff including Classic Vanilla and TBC! I'm sure there are people like me hungering for good addon development tutorials.
great work bro! I'm hoping to get into a coding bootcamp and was interested in making my own addon or two. I've been scouring the web for some sort of walkthrough and so happy I found your videos!!! Thank you!!!
Amazing videos! Thank you so much for these! (P.S. your voice is amazing. ^^) I'm also a Comp Sci student currently looking to practice programming by developing addons for WoW. Your videos were so helpful!
It is much nicer to give default values like this imo: local function counter(a, b, c) a = a or 0 b = b or 0 c = c or 0 local result = (a * b) + c return result end If a, b or c are given values, they will equal the value given. If they are nil, they will instead equal the default value (in this case 0). counter(5) will return 0 (5 * 0 + 0) counter(3, 7) will return 21 (3 * 7 + 0) You can skip entering arguments by entering a nil value counter(5, nil, 10) will return 10 (5 * 0 + 10) counter(nil, nil, 37) will return 37 (0 * 0 + 37)
Great introduction video. I would PAY for tutorials like this; thank you for offering all of this information for free. You might want to think about doing a udemy or something in the future.
I have recorded future videos, I just need to edit them and I have 2 Uni programming assigns due in soon so I will upload them after (in 5 days or less)
There has been more then 5 days now... and I really want to see the rest ;) I think your doing a superb jobb with this. Ive been programing in Java and C# so everything so far has been verry clear for me from the beginning. Personaly Im looking forward to the XML versions... I have problem finding a good tutorial on what the different effects are and how to create practical frames with buttons, drag and dropp spell, modifying existing frames as mailbox frame for example.
"Beware of bugs in the above code; I have only proved it correct, not tried it." - Donald Knuth Tired to run the program twice... "So this definitely works." - Mayron
Hey, I guess if I watch enough of these I will figure it out anyways, but can function variables be passed as variables like a delegate in C#? For example: local myFunc1 = function(a, b) return a + b; end local myFunc2 = function(otherFunction, a, b) return otherFunction(a, b); end print(myFunc2(myFunc1, 1, 2)); Thanks! =)
hello, ty for your videos, i need to do a question, is posible to change the version from one addon, i wanna use addon that is using on dragonflight "consoleport" and modify it for use on wow cataclysm 4.3.4.
There are 2 add ons that I liked that are no longer up to date. I use to program a long time ago. is there a point I can jump to that would get me closer to updating them to work?
Hey, I downloaded MayronUI Gen4 - Version 4.4.4 and everything looks great but the character picture/hp does not show inside the green box (monk) it just shows in the top left corner, and if i click someone else, the rest of the box pops up but their name/picture and stuff shows up to the right of mine
It sounds like the profile settings for Shadowed Unit frames did not load when you installed the UI. Make sure that when you install the UI, Shadowed Uunit Frames is ticked in the "Override AddOn settings" scroll frame before pressing continue and that the AddOn is definitely enabled. Type "/mui install" to reinstall it.
Thank you for the quick response! Might have been cause I already had SUF downloaded, I love the look and feel of this UI and I'm a college student aswell, will be donating, thanks!
haha well thank you very much but also if you do not want to override Shadow Unit Frame settings and want to use your own, the UI uses the default profile so even though you set it to not override settings it still changes the profile to the default one so you never lost anything. Just type "/suf" and go to profiles and you should be able to change it back to the profile you use to use to get what you had back.
+David Downey In the next video I explained this and should have mentioned it in this video. I think I was trying to show people the syntax for if statements and the not operator. But still good for pointing it out :)
Mayron's Hideout its a really good tutorial, just seemed like a really long winded way to do it; I have no background in programming and I really did learn from this vid.
Why are you teaching Lua basics? Who the hell would try to develop WoW AddOns with complete no knowledge of programming? If you don't know how to program then go get a book and study, come back after you ready granted you won't quit. There is no point wasting valuable time trying to teach "basics" of Lua in a rush, people won't understand anything and will be vulnerable for mistakes. Maryon you should assume that people who are interested in developing WoW AddOns have good knowledge of Lua, that way you can focus more on actual addon development.
Subscribed bro. I have learned more in your two videos than I ever did in my four years of college. Very well done.
From Python web dev to lúa feels so natural, thank you for such a wonderful serie!!!
Just a note to 21:10 : actually "if not b then ... end" will execute "..." when b is nil OR false (a boolean value). Also note: in LUA 0 (numeric zero), "" (empty string) and empty table -- all considered to be true (and "..." will be executed).
Thanks for the videos. They are very good.
For the people looking at it and getting confused by "not b" I have the following suggestion:
Try to read it. substitute nil for b and read it left right.
1. if (not b) then b = 1000 end.
Reading it if (not nil) then b = 1000 end that seems to mean b will stay nil.
Well do this instead. It says what it means.
2. if (b == nil) then b = 1000 end
Reading it if ( nil equals nil ) then b = 1000 end
Both of these work but since the second one means what it says and doesn't take a convoluted explanation to understand, I would always do it the second way. This would make my addon easier for me or anyone else to figure out.
Great videos! Please, consider updating them for the latest stuff including Classic Vanilla and TBC! I'm sure there are people like me hungering for good addon development tutorials.
that would be great. found this series just yet.
Man, I was really happy when you went over to the the (right) way of declaring functions. :D
You're very nice at explanation, nice use of examples to show concepts.
Very nice explained. Looking forward to frame guides I hope to find in this series
from c++ i come to lua with no difficult time! Thanks!
I keep putting a semi colon on the end of each line lol
great work bro! I'm hoping to get into a coding bootcamp and was interested in making my own addon or two. I've been scouring the web for some sort of walkthrough and so happy I found your videos!!! Thank you!!!
I'm really liking this series, hope to see more soon :)
Amazing videos! Thank you so much for these! (P.S. your voice is amazing. ^^)
I'm also a Comp Sci student currently looking to practice programming by developing addons for WoW. Your videos were so helpful!
It is much nicer to give default values like this imo:
local function counter(a, b, c)
a = a or 0
b = b or 0
c = c or 0
local result = (a * b) + c
return result
end
If a, b or c are given values, they will equal the value given. If they are nil, they will instead equal the default value (in this case 0).
counter(5) will return 0 (5 * 0 + 0)
counter(3, 7) will return 21 (3 * 7 + 0)
You can skip entering arguments by entering a nil value
counter(5, nil, 10) will return 10 (5 * 0 + 10)
counter(nil, nil, 37) will return 37 (0 * 0 + 37)
Thanks a lot for making those videos. Very good job.
Great introduction video. I would PAY for tutorials like this; thank you for offering all of this information for free. You might want to think about doing a udemy or something in the future.
Aw hell yes! Been waiting for this C: Love 'em, please keep it coming ^^
I have recorded future videos, I just need to edit them and I have 2 Uni programming assigns due in soon so I will upload them after (in 5 days or less)
There has been more then 5 days now... and I really want to see the rest ;)
I think your doing a superb jobb with this.
Ive been programing in Java and C# so everything so far has been verry clear for me from the beginning. Personaly Im looking forward to the XML versions... I have problem finding a good tutorial on what the different effects are and how to create practical frames with buttons, drag and dropp spell, modifying existing frames as mailbox frame for example.
Sorry I know I have put this off for a bit now and I will 100% be uploading what I have finished tomorrow and continue with the rest.
I shouldn't make promises because today I have had zero time for anything but as soon as I can, I will upload them :)
So well articulated. You could lecture at a university.
Trying to explain Lua to non-programmers...wow. I feel for you buddy. That's some serious commitment.
"Beware of bugs in the above code; I have only proved it correct, not tried it." - Donald Knuth
Tired to run the program twice... "So this definitely works." - Mayron
Hey, I guess if I watch enough of these I will figure it out anyways, but can function variables be passed as variables like a delegate in C#?
For example:
local myFunc1 = function(a, b)
return a + b;
end
local myFunc2 = function(otherFunction, a, b)
return otherFunction(a, b);
end
print(myFunc2(myFunc1, 1, 2));
Thanks! =)
hello, ty for your videos, i need to do a question, is posible to change the version from one addon, i wanna use addon that is using on dragonflight "consoleport" and modify it for use on wow cataclysm 4.3.4.
Its a very nice guide.
Is there any way to backport 3.3.5 epgp loot addon to 2.4.3?
There are 2 add ons that I liked that are no longer up to date. I use to program a long time ago. is there a point I can jump to that would get me closer to updating them to work?
Hey, I downloaded MayronUI Gen4 - Version 4.4.4 and everything looks great but the character picture/hp does not show inside the green box (monk) it just shows in the top left corner, and if i click someone else, the rest of the box pops up but their name/picture and stuff shows up to the right of mine
It sounds like the profile settings for Shadowed Unit frames did not load when you installed the UI. Make sure that when you install the UI, Shadowed Uunit Frames is ticked in the "Override AddOn settings" scroll frame before pressing continue and that the AddOn is definitely enabled. Type "/mui install" to reinstall it.
Thank you for the quick response! Might have been cause I already had SUF downloaded, I love the look and feel of this UI and I'm a college student aswell, will be donating, thanks!
haha well thank you very much but also if you do not want to override Shadow Unit Frame settings and want to use your own, the UI uses the default profile so even though you set it to not override settings it still changes the profile to the default one so you never lost anything. Just type "/suf" and go to profiles and you should be able to change it back to the profile you use to use to get what you had back.
Anyone can help me out with a quite easy addon?
for some reason i can't get this to work
make sure youur parantheses are encapsulated right
More please....
awesome!
20:15 var1 = var1 or 0
+David Downey In the next video I explained this and should have mentioned it in this video. I think I was trying to show people the syntax for if statements and the not operator. But still good for pointing it out :)
Mayron's Hideout its a really good tutorial, just seemed like a really long winded way to do it; I have no background in programming and I really did learn from this vid.
thx
You should have named the hotkeys in notepad++ D:
Why are you teaching Lua basics? Who the hell would try to develop WoW AddOns with complete no knowledge of programming? If you don't know how to program then go get a book and study, come back after you ready granted you won't quit. There is no point wasting valuable time trying to teach "basics" of Lua in a rush, people won't understand anything and will be vulnerable for mistakes.
Maryon you should assume that people who are interested in developing WoW AddOns have good knowledge of Lua, that way you can focus more on actual addon development.
+Israel ;)
Why not? It IS helpful - and you don't need to waste YOUR time prescribing others what to do with theirs. Thou you may, if you want to. ^^