WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   Compiling LUA (https://www.wowinterface.com/forums/showthread.php?t=4419)

G4m3w1z 04-11-06 12:46 AM

Compiling LUA
 
Okay, I have a compiler and would like to compile lua 5.1. But I don't know where to start, how to do this, etc.

http://www.cs.virginia.edu/~lcc-win32/

This is the compiler. Could anyone help me on what I should do? I know it's a lot of work and might be difficult to explain. :/

Thanks!

brotherhobbes 04-11-06 08:01 AM

That is a compilier for the C programming language, G4m3w1z.

If you want to make an addon for WoW, you just write the .lua files and leave them like that in the appropriate directory (World of Warcraft/Interface/Addons/yourAddonName/yourAddonName.lua). You do not have to compile the .lua files.

G4m3w1z 04-11-06 12:23 PM

Quote:

Originally Posted by brotherhobbes
That is a compilier for the C programming language, G4m3w1z.

If you want to make an addon for WoW, you just write the .lua files and leave them like that in the appropriate directory (World of Warcraft/Interface/Addons/yourAddonName/yourAddonName.lua). You do not have to compile the .lua files.

Yes, I do want to start making addons, and I do know all I need to do is make the files, and do not need to compile lua. I was just wondering if it would help in learning. I didn't realize that was C. I'm so stupid -.- Thanks.

EDIT: Since I'm learning LUA and the book suggests having the lua executable (which I assume is the compiled version) to run my first examples, I was just hoping I could compile it. If that's not the case then where could I get the lua executable file? I'm a total newb at this but I'm really willing to learn, and I really WANT to.
Thanks.

Creamo 04-11-06 03:25 PM

Basic steps for creating a WoW addon:
  • Think about what you wish to make.
  • Implement your ideas into a lua script. Available lua, WoW user interface, etc functions/procedures can be found at WoWWiki, and thus is a very decent place to start learning the API.
  • Create a name for your project. Example: MyFirstAddon
  • Open up your World of Warcraft\Interface\Addons folder, and create a new folder named after your project. Example: C:\World of Warcraft\Interface\Addons\MyFirstAddOn
  • Write your lua script. Name this script after your project and place it in your project folder. Example: C:\World of Warcraft\Interface\Addons\MyFirstAddOn\MyFirstAddOn.lua
  • If you wish to implement a UI, write your xml file, name it after your project, and place it in your project folder. Example: C:\World of Warcraft\Interface\Addons\MyFirstAddOn\MyFirstAddOn.xml
  • Create the toc (table of contents) file for your project. This file will inform WoW detailed information about your addon, such as which files your project should include in your addon. Name this file after your project and place it in your project folder. Example: C:\World of Warcraft\Interface\Addons\MyFirstAddOn\MyFirstAddOn.toc
  • You should now be able to test your addon in WoW. To do so: Run WoW. Log in. Click the "AddOns" button located in the bottom-left corner of the character selection screen. Make sure your addon is enabled. Enter the game world.
Hope this helps. ;)
- Creamo

G4m3w1z 04-11-06 04:20 PM

Quote:

Originally Posted by Creamo
Basic steps for creating a WoW addon:
  • Think about what you wish to make.
  • Implement your ideas into a lua script. Available lua, WoW user interface, etc functions/procedures can be found at WoWWiki, and thus is a very decent place to start learning the API.
  • Create a name for your project. Example: MyFirstAddon
  • Open up your World of Warcraft\Interface\Addons folder, and create a new folder named after your project. Example: C:\World of Warcraft\Interface\Addons\MyFirstAddOn
  • Write your lua script. Name this script after your project and place it in your project folder. Example: C:\World of Warcraft\Interface\Addons\MyFirstAddOn\MyFirstAddOn.lua
  • If you wish to implement a UI, write your xml file, name it after your project, and place it in your project folder. Example: C:\World of Warcraft\Interface\Addons\MyFirstAddOn\MyFirstAddOn.xml
  • Create the toc (table of contents) file for your project. This file will inform WoW detailed information about your addon, such as which files your project should include in your addon. Name this file after your project and place it in your project folder. Example: C:\World of Warcraft\Interface\Addons\MyFirstAddOn\MyFirstAddOn.toc
  • You should now be able to test your addon in WoW. To do so: Run WoW. Log in. Click the "AddOns" button located in the bottom-left corner of the character selection screen. Make sure your addon is enabled. Enter the game world.
Hope this helps. ;)
- Creamo

It does, thank you! But I am still wondering where/how to get the lua EXE file mentioned here.
http://www.lua.org/pil/1.html
Bottom of the page. "For a start, we recommend that you use the stand-alone interpreter (that is, the lua executable) to run your first examples and experiments. "

Thanks.

Ratbert_CP 04-11-06 04:34 PM

Quote:

Originally Posted by G4m3w1z
It does, thank you! But I am still wondering where/how to get the lua EXE file mentioned here.
http://www.lua.org/pil/1.html
Bottom of the page. "For a start, we recommend that you use the stand-alone interpreter (that is, the lua executable) to run your first examples and experiments. "

Thanks.

Follow the downloads link at lua.org to get the appropriate binary. But you'll have really, really bad luck trying to test WoW addons, since you're missing the entire WoW API...

G4m3w1z 04-11-06 04:53 PM

Quote:

Originally Posted by Ratbert_CP
Follow the downloads link at lua.org to get the appropriate binary. But you'll have really, really bad luck trying to test WoW addons, since you're missing the entire WoW API...

Yeah, I understand that, but I want to learn the basics of lua first, and therefor this could help me, couldn't it?

brotherhobbes 04-11-06 05:43 PM

You don't need it. Having a basic understanding of programming concepts would help the most, I think.

I had no previous experience with LUA, but using the http://www.wowwiki.com/World_of_Warcraft_API that Creamo mentioned and the FuBar API documents I was able to write an addon.

If you want to read up on LUA, check out these links I just found on Google:
http://www.lua.org/pil/
http://www.lua.org/manual/5.1/
but I honestly think you could make something without having even looked at them (although it might turn out with some ugly code like my addon :p ).

G4m3w1z 04-11-06 07:40 PM

Quote:

Originally Posted by brotherhobbes
You don't need it. Having a basic understanding of programming concepts would help the most, I think.

I had no previous experience with LUA, but using the http://www.wowwiki.com/World_of_Warcraft_API that Creamo mentioned and the FuBar API documents I was able to write an addon.

If you want to read up on LUA, check out these links I just found on Google:
http://www.lua.org/pil/
http://www.lua.org/manual/5.1/
but I honestly think you could make something without having even looked at them (although it might turn out with some ugly code like my addon :p ).

Thanks! FuBar?... ;o what's that?

EDIT: Okay, I'm doing Farang's tutorial, I've gotten to the point where you should load up WoW and test it. However it is not working. I've redone the code over and over, looked for any possible ways it wouldn't work. I'm confused. I try to type /ff 1 it does nothing.


All times are GMT -6. The time now is 09:41 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI