Page 2 of 2

Re: Custom Icons

Posted: Mon Jan 21, 2008 12:18 am
by FragMe!
ITfactor
post your ingame.req and the part of you lua where you are calling for the ingame.lvl

Re: Custom Icons

Posted: Mon Jan 21, 2008 12:52 am
by theITfactor
FragMe! wrote:ITfactor
post your ingame.req and the part of you lua where you are calling for the ingame.lvl
ingame.req (data_PWN/Common)
Hidden/Spoiler:
ucft
{
REQN
{
"model"
"com_icon_imperial"
"com_icon_alliance"
}
}
lua where I am calling it
Hidden/Spoiler:
SetMemoryPoolSize ("Combo::DamageSample",8000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",140) -- should be ~1x #combo -- should be ~1x #combo

ReadDataFile("dc:ingame.lvl")
ReadDataFile("ingame.lvl")

ALL = 1
IMP = 2
AT4 = 3
-- These variables do not change

Re: Custom Icons

Posted: Mon Jan 21, 2008 10:01 am
by FragMe!
how big is you ingame.lvl file? You may have to do a clean and remunge. Or you could just go into the _lvl_PC folder of your map and delete the one there then remunge.

The original ingame.lvl is about 14 Meg your ingame should be about 1 meg (depending on how many Icons you changed)

Re: Custom Icons

Posted: Mon Jan 21, 2008 2:05 pm
by theITfactor
FragMe! wrote:how big is you ingame.lvl file? You may have to do a clean and remunge. Or you could just go into the _lvl_PC folder of your map and delete the one there then remunge.

The original ingame.lvl is about 14 Meg your ingame should be about 1 meg (depending on how many Icons you changed)
hmm didn't work, I'm starting to think it might be a separate problem, but I'm still not sure.

This came up a lot in the error log:
Hidden/Spoiler:
Message Severity: 3
.\Source\LuaHelper.cpp(312)
CallProc failed: (none):0: attempt to index global `table' (a userdata value)
stack traceback:
(none): in function `HandleMouseRecurse'
(none): in function `gHandleMouse'
(none): in function `PopupHandleMouse'

Re: Custom Icons

Posted: Mon Jan 21, 2008 3:06 pm
by [RDH]Zerted
I'm guessing the error is talking about the 'table' on line 243 of ifutil_mouse.lua. I remember looking at ifutil_mouse, but I didn't change anything (at least not on purpose, and it will be a few hours till I can get home to check). ifutil_mouse is part of common.lvl, and thus shouldn't be changed by the custom ingame.lvl...

By any chance, are you using the common.lvl from FreeCam_Jan-19-2008?

What was the pop-up that was popping up when you got the error?
Are you willing to package up your map, so others can download it and test the error?
Can you post the rest of your lua?

What happens when you delete your custom ingame.lvl (leave your lua alone, just delete it from the addon/data_PWN/data/_LVL_PC/)?

Re: Custom Icons

Posted: Mon Jan 21, 2008 4:56 pm
by theITfactor
[RDH]Zerted wrote:I'm guessing the error is talking about the 'table' on line 243 of ifutil_mouse.lua. I remember looking at ifutil_mouse, but I didn't change anything (at least not on purpose, and it will be a few hours till I can get home to check). ifutil_mouse is part of common.lvl, and thus shouldn't be changed by the custom ingame.lvl...

By any chance, are you using the common.lvl from FreeCam_Jan-19-2008?

What was the pop-up that was popping up when you got the error?
Are you willing to package up your map, so others can download it and test the error?
Can you post the rest of your lua?

What happens when you delete your custom ingame.lvl (leave your lua alone, just delete it from the addon/data_PWN/data/_LVL_PC/)?
Well I removed the custom icons + uninstalled the old freecam i was using (june 2006 edition i think lol) Still had the problem, looked in my lua and found this:
Hidden/Spoiler:
table = OnEnterRegion(
function(regIn,character)
MoveEntityToNode(character,"table")
end,
"table"
)
ActivateRegion("table")
I changed "table = OnEnterRegion" to table1 and it fixed it. Any ideas why that screwed up my menus? :roll:

Re: Custom Icons

Posted: Mon Jan 21, 2008 5:52 pm
by [RDH]Zerted
The global 'table' is used by Lua for table/array/matrix functions. Examples:
table.remove()
table.insert()
table.foreach()


By doing table = OnEnterRegion... you replaced's Lua table functions with OnEnterRegion. When the mouse handling code attempted to access a table of GUI components, it accessed your OnEnterRegion instead.

You should be able to fix it by renaming your table to something else or changing your line to local table = OnEnterRegion(

Check my website if you want the FreeCam Jan_19_2008 version.

Re: Custom Icons

Posted: Mon Jan 21, 2008 6:43 pm
by theITfactor
[RDH]Zerted wrote:The global 'table' is used by Lua for table/array/matrix functions. Examples:
table.remove()
table.insert()
table.foreach()


By doing table = OnEnterRegion... you replaced's Lua table functions with OnEnterRegion. When the mouse handling code attempted to access a table of GUI components, it accessed your OnEnterRegion instead.

You should be able to fix it by renaming your table to something else or changing your line to local table = OnEnterRegion(

Check my website if you want the FreeCam Jan_19_2008 version.
Thanks Zerted, it is all working now. I suppose all the posts on this topic about my issue can be deleted, they weren't relevant after all. :roll:

I'll leave it up to FragMe!. These posts show the importance of using the lua keyword: local, a bit of info on SWBF2 mouse handling, info about another FreeCam release 3 days ago, and another example lua and req overriding ingame.lvl. Its up to you... ~[RDH]Zerted

Re: Custom Icons

Posted: Mon Jan 21, 2008 9:18 pm
by FragMe!
We shall leave it all as is. I am just happy it wasn't my mod that was buggering you up :D at least I don't think it was.

Oh another note since I believe you were doing this forr assault mode the untakeable command post by default doesn't show Icons. There may be a way but have to experiment first but it shouldn't be anymore than adding a couple of lines to the ODF. :funny2:

Re: Custom Icons

Posted: Tue Jan 22, 2008 11:13 am
by EGG_GUTS
Wait a go FragMe! those are Sweet! :D

Re: Custom Icons

Posted: Tue Jan 22, 2008 10:10 pm
by Achronos-117
(Edwinator) wrote:My lord! This is great!

What, with duel wielded pistols just developed, and now custom side icons, the community just took a huuuuge leap.
Dual Wielded Pistols!? WHERE?!

Anyway nice CP stuff you created, even though it won't serve me much use since im not a modder. :)

Re: Custom Icons

Posted: Sun Jan 27, 2008 10:39 am
by Darth_Z13
Wow terrific job! :D

Thanks a bunch FragMe and Zerted. :D

Re: Custom Icons

Posted: Mon Jan 28, 2008 5:38 pm
by (Edwinator)
Achronos-117 wrote:
(Edwinator) wrote:My lord! This is great!

What, with duel wielded pistols just developed, and now custom side icons, the community just took a huuuuge leap.
Dual Wielded Pistols!? WHERE?!

Anyway nice CP stuff you created, even though it won't serve me much use since im not a modder. :)
Dual Pistols, I believe are going to be incorporated in the latest convo pack.

Re: Custom Icons

Posted: Tue Feb 12, 2008 2:10 pm
by wazmol
Thats amazing, no wonder your a Moderator!