Reached Compiler limit?

Anything to do with GTA1/GTA2 modding (tools, scripts and more).
Post Reply
CarThief
Hitman
Hitman
Posts: 108
Joined: 19 May 2012, 18:12
GH nick: CarThief
Location: Holland, AKA The Netherlands

Reached Compiler limit?

Post by CarThief »

The maps forum is going dreadfully slowly so i figure i'd post here as well and see if there's any luck with the situation.
The situation being that i think i reached the limit of what i can cram into the compiler, the latest mission file which handles random events has alot of repeated character creation and such and i think that's just jacking up the memory/space usage of it immensely. There's far more details in the post i made in the maps forum.

So basically, is it possible to put together an compiler which can take even MORE commands and bytes? I'm already using the Hacked Compiler, but even that is not enough, as the compiler crashed mid-compilation, probaly because of reaching the limit it has.
If i cant get past that compiler issue i dont have the faintest clue how the hell i'm going to get any progress at all with the project. As far as i'm aware the game itself can handle all this fairly well minus a weird crash when exiting the script, which might merely be a scripting error, hopefully.

User avatar
Pyro
Immortal
Posts: 414
Joined: 17 Mar 2010, 04:07
GH nick: Pyro
Location: Wales, UK

Re: Reached Compiler limit?

Post by Pyro »

I believe you can get past it by making external mission files and using the "LAUNCH_MISSION (filename.mis)" command where needed. Put some stuff in a MIS file and then use MISSION_HAS_FINISHED to go back to main script.

Note: I've not tried this method personally...

CarThief
Hitman
Hitman
Posts: 108
Joined: 19 May 2012, 18:12
GH nick: CarThief
Location: Holland, AKA The Netherlands

Re: Reached Compiler limit?

Post by CarThief »

Perhaps i was a bit vague, my problem isnt that the main script file is too large (its less than 2230 lines), its that the compiler seems unable to handle all of the code from ALL of the mission files i've added. :P
The latest mission file i was trying to launch seems to have hit some kind of limit in the compiler and it just crashes mid-compilation, leaving some scripts uncompiled.

I'm thinking its some kind of byte or other memory limit in the compiler, happen to know anyway to increase/remove those kind of limits on the compiler so it can handle even larger or plain any amount of functional GTA2 code? (Or atleast handle tons of missions if they dont pass the limit of maximum lines of code in each file induvidually.)
Curiously the editor counts a maximum of 26 scripts in total, i presume 25 of these are functional mission scripts. Do hope the amount of missions isnt going to be the cause of any problem anytime soon.

Edit: Hmm... I wonder if it would be a hacky but doable way to comment out one half of the total mission scripts and compile, or use empty dummy scripts, then do the same with the other half, and place all the non-empty scr files in the GTA2 folder. Hm, assuming GTA2 merely load SCR files and doesnt have any problems if the script files changed without a just-as-recent main script. Though i do recall while removing mission bugs that the game has no problem to making small ajustments to the mission scripts and then replacing purely the mission scr files without any main script updates.
Perhaps a viable alternative after all, if it works the same with a empty script to simply make a path and reference to opening said scr file... Just extremely annoying to do, though.

User avatar
Sektor
Boss
Boss
Posts: 1391
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: Reached Compiler limit?

Post by Sektor »

If you use SET the Jones way, you can reduce some repeated code, especially the 2 to 6 player code.

Post Reply