Hi Guys,
The BA-Layout widget in BA is broken in 0.77
This widget was made by lurker, he said he would fix it like 1,5 months ago, however it appears he ran out of time, or has set different priority's. So any volunteers who can/want to fix this widget for BA? or write a new one which does the same? (determine the layout of the buildmenu)
Any help is appreciated!
BA-Layout
Moderator: Moderators
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: BA-Layout
I'm pretty sure it's the same widget that he originally wrote for me. And yes I asked about the same length of time ago, yes I'm screwed if it (and other thigns that he wrote) aren't fixed fairly soon.
Re: BA-Layout
if this is the same 'problem' BaSiC had with his layout widget
borrowed from BA it is because LUA_COMPAT_MOD was turned off in luaconf.h blame trepan >.>
open up gui_BA_layout.lua in notepad
and do a replace all occurences of "math.mod" with "math.fmod"
that should fi x it
in b4 nub
borrowed from BA it is because LUA_COMPAT_MOD was turned off in luaconf.h blame trepan >.>
open up gui_BA_layout.lua in notepad
and do a replace all occurences of "math.mod" with "math.fmod"
that should fi x it
in b4 nub
Re: BA-Layout
So math.mod was changed to math.fmod? Why is this even necessary?Andrej wrote:if this is the same 'problem' BaSiC had with his layout widget
borrowed from BA it is because LUA_COMPAT_MOD was turned off in luaconf.h blame trepan >.>
open up gui_BA_layout.lua in notepad
and do a replace all occurences of "math.mod" with "math.fmod"
that should fi x it
in b4 nub
Re: BA-Layout
Thanks =)
Re: BA-Layout
just a guess, maybe math.mod is not doing modulus at all, but doing "floating point modulus" aka a-floor(a/b)*bREVENGE wrote:So math.mod was changed to math.fmod? Why is this even necessary?Andrej wrote:if this is the same 'problem' BaSiC had with his layout widget
borrowed from BA it is because LUA_COMPAT_MOD was turned off in luaconf.h blame trepan >.>
open up gui_BA_layout.lua in notepad
and do a replace all occurences of "math.mod" with "math.fmod"
that should fi x it
in b4 nub
edit: correction:
math.mod is indeed doing proper remainder of division, with floats. i.e. math.fmod(-1,0.7) = -0.3
For most practical uses however, thats really not what you need. You need to use operator "%" instead.
-1%0.7 = 0.4 , which is the value you usually want to get when you do modulus on negative number. In my whole career I think I seen no code that would want to get 0 .. 0.7 from modulus when input is positive and -0.7 .. 0 when input is negative.
Re: BA-Layout
No Electricities!
And until 1 day before power loss I was busy at my summer job.
And until 1 day before power loss I was busy at my summer job.
Re: BA-Layout
Andrej wrote:if this is the same 'problem' BaSiC had with his layout widget
"borrowed" from BA
Fixed.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: BA-Layout
Actually they all borrowed from evo if you wanna get picky. :_)
Unless the one lurker made for me the night we stayed up till god knows when is a different one...
Unless the one lurker made for me the night we stayed up till god knows when is a different one...