Page 1 of 1

FYI: A LUA Script Can Be No Larger Than 50KB

Posted: Thu Jul 13, 2006 11:32 am
by xwingguy
Topic.

Just another ceiling I bumped my head on.

RE: FYI: A LUA Script Can Be No Larger Than 50KB

Posted: Thu Jul 13, 2006 12:36 pm
by Xavious
really? didn't know that.

RE: FYI: A LUA Script Can Be No Larger Than 50KB

Posted: Thu Jul 13, 2006 1:15 pm
by Teancum
What's a standard LUA weigh in at?

Posted: Thu Jul 13, 2006 2:08 pm
by Rekubot
Around 9.11kb. So it shouldn't be too big of a problem as long as you are careful enough.

RE: FYI: A LUA Script Can Be No Larger Than 50KB

Posted: Thu Jul 13, 2006 2:19 pm
by [RDH]Zerted
The biggest Lua in the mod tools is 148KB ( ifs_missionselect_pcmulti.lua ). There are a number of other ones that are larger than 50KB too.
I would say the average is 10-15KB.
What error message are you getting?

Re: RE: FYI: A LUA Script Can Be No Larger Than 50KB

Posted: Thu Jul 13, 2006 2:22 pm
by Xavious
[RDH]Zerted wrote:What error message are you getting?
i don't think he's stating an error.

RE: Re: RE: FYI: A LUA Script Can Be No Larger Than 50KB

Posted: Thu Jul 13, 2006 2:41 pm
by MasterSkywalker
^He do gets an error, thats what the whole thread is about :P

RE: Re: RE: FYI: A LUA Script Can Be No Larger Than 50KB

Posted: Thu Jul 13, 2006 2:57 pm
by xwingguy
If your gamemode script is larger than 50 KB it causes a fatal error "Could not read @#$g_con" etc.

RE: Re: RE: FYI: A LUA Script Can Be No Larger Than 50KB

Posted: Thu Jul 13, 2006 3:19 pm
by MasterSkywalker
I do wonder how can you get your @#$g_con.lua get so big?

RE: Re: RE: FYI: A LUA Script Can Be No Larger Than 50KB

Posted: Thu Jul 13, 2006 3:22 pm
by darthpingu
space...

RE: Re: RE: FYI: A LUA Script Can Be No Larger Than 50KB

Posted: Thu Jul 13, 2006 3:24 pm
by [RDH]Zerted
No, I just tried it with a 54KB gamemode script. It munged fine. You've got an error in one of your lines.

Make sure you have @#$g_con.req in bf2_modtools\TEMPLATE\Common\mission
Make sure you have @#$g_con.lua in bf2_modtools\TEMPLATE\Common\scripts\@#$

Visual Munge uses these templates to generate the files for each custom map. @#$ gets replaced with your map's ID. Search through your luas and reqs to make sure all the @#$ have been replaced.