WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   Bug Report: % Symbol (https://www.wowinterface.com/forums/showthread.php?t=13923)

Cosmic Cleric 12-05-07 01:28 PM

Bug Report: % Symbol
 
Hello. Using the latest version of WoW UI Designer. Found a problem with how it parses LUA code.

Specifically, I have this piece of code...

Code:

slot  = ( aUnitNumber - 1 ) % 5 + 1;
The "%" symbol is generating an "unexpected symbol" error in the Messages section, and the line on the left side of the editor window that shows the start to end of a function, stops at the line.

Don't know why, but WOW UI Designer doesn't like to see a "%" character in LUA code, which is as far as I know, a valid math symbol in LUA (http://www.lua.org/manual/5.1/manual.html#2.5.1 ).

Taffu 12-06-07 09:26 AM

Try using:

Code:

mod(value, modulus)
to complete your equation

Shirik 12-06-07 05:20 PM

It was probably built with 5.0, which is what WoW started out with. % used to be the upvalue operator, and in 5.0 it didn't exist at all. In 5.1, it became the modulus operator.

Look for a lua/luac.exe in the program folder and see if you can't update it to 5.1.

If all else fails, math.mod() is a valid solution.

Taffu 12-06-07 06:47 PM

I tested around with it a bit and it's not just WoWUI Builder. Scite throws the same error when compiling :(

Shirik 12-07-07 01:19 AM

Quote:

Originally Posted by Taffu
I tested around with it a bit and it's not just WoWUI Builder. Scite throws the same error when compiling :(

Again, SciTE was built with Lua 5.0. In 5.0, % was not the modulus operator. Before 5.0, it was the upvalue operator. Only in 5.1 is it the modulus operator. Use one of the two options I supplied above.

Cosmic Cleric 12-07-07 01:48 PM

Quote:

Originally Posted by Shirik
It was probably built with 5.0, which is what WoW started out with. % used to be the upvalue operator, and in 5.0 it didn't exist at all. In 5.1, it became the modulus operator.

Look for a lua/luac.exe in the program folder and see if you can't update it to 5.1.

If all else fails, math.mod() is a valid solution.

I ended up going with the math.mod() section when I first discovered the problem. I haven't tried replacing the lua/luac.exe files(s).

Does anyone know if this add-on still being ACTIVELY developed?

Nulkris 12-09-07 03:28 AM

I will update with this fix when I have completed some other work and made sure that I can upload executables with the current crack down.

Nulk

Polarina 12-09-07 04:58 AM

Quote:

Originally Posted by Nulkris
I will update with this fix when I have completed some other work and made sure that I can upload executables with the current crack down.

Nulk

You are not allowed to upload EXE files anymore. Not even within a ZIP file!

Seerah 12-09-07 05:11 PM

This is not a mod, though. It is a program and a featured item on this site.


All times are GMT -6. The time now is 05:02 PM.

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