keybindings.lua

Babylon 5 mod for Homeworld 2
<small>» <a href="http://hw2b5.thegamingunion.co.uk">Website</a></small>

Moderator: Zeelich

scarbrow
Junior Member
Posts: 4
Joined: Fri Sep 11, 2009 12:24 am

keybindings.lua

Post by scarbrow » Fri Sep 11, 2009 12:31 am

Hi guys, just thought you should know the keybindings file has a lot of errors in it. I fixed it up in the bsg mod svn so it won't be responsible for any random mid-game crashes.

However i noticed there are only about 3 differences throughout it when comparing the main body of both.

snake
Junior Member
Posts: 267
Joined: Fri Mar 21, 2003 1:00 am
Location: france

Post by snake » Sat Sep 12, 2009 11:29 pm

could you tell me what you "fixed" exactly ?

scarbrow
Junior Member
Posts: 4
Joined: Fri Sep 11, 2009 12:24 am

Post by scarbrow » Sun Sep 13, 2009 3:28 am

There are (were for BSG) about 350 commas missing which were responsible for random freeze ups mid-game.

User avatar
Dukoth
Posts: 719
Joined: Sun Nov 12, 2000 1:00 am
Location: at my computer.......duh
Contact:

Post by Dukoth » Sun Sep 13, 2009 7:57 pm

well, thats good to know

snake
Junior Member
Posts: 267
Joined: Fri Mar 21, 2003 1:00 am
Location: france

Post by snake » Sun Sep 13, 2009 9:02 pm

scarbrow wrote:There are (were for BSG) about 350 commas missing which were responsible for random freeze ups mid-game.
could you give me some examples please ?
I'm really interested :)

scarbrow
Junior Member
Posts: 4
Joined: Fri Sep 11, 2009 12:24 am

Post by scarbrow » Sun Sep 13, 2009 10:58 pm

With the commas missing:

Code: Select all

{ 2, eExit, INKE_KeyDown, 0, "$5300", {ALTKEY, F4KEY} },
With no commas missing:

Code: Select all

{ 2, eExit, INKE_KeyDown, 0, "$5300", { ALTKEY, F4KEY,}, },

User avatar
TheOneNamedViper
Posts: 6859
Joined: Sat Dec 30, 2000 1:00 am
Location: Denmark
Contact:

Post by TheOneNamedViper » Mon Sep 14, 2009 9:32 am

Oh yeah, that's right. HW2 is a bit peculiar with its commas isn't it? I forgot about that.

I'll probably want to go through the maps I made to check for this also...

snake
Junior Member
Posts: 267
Joined: Fri Mar 21, 2003 1:00 am
Location: france

Post by snake » Mon Sep 14, 2009 10:14 am

It's strange, because there is many place in the code (in the UI for example) where the last comma in a table is ommited. And from what I read in LUa documentation, it's not needed. So I don't understand why HW2 crash without those :confused:

User avatar
CnlPepper
Posts: 1621
Joined: Mon Oct 23, 2000 12:00 am
Location: Oxford, UK
Contact:

Post by CnlPepper » Mon Sep 14, 2009 12:46 pm

I'm also very surprised, the line you posted (before modification) is entirely valid Lua. As snake says, there a plenty of similarly written lines in our code which have not caused a crash or apparent slowdown.

scarbrow
Junior Member
Posts: 4
Joined: Fri Sep 11, 2009 12:24 am

Post by scarbrow » Mon Sep 14, 2009 4:04 pm

I can say with certainty that it makes a huge difference for osx, which is extremely touchy when it comes to HW2 code. For windows, I know its possible to get away with more variance in the code and this could be one of them.

Post Reply

Return to “Babylon 5: War Without End”