If I compile my code ,why cant I use files from other U files?
I get an error message like : error ,cant find class 'mod.class'
compiling codes
-
- Godlike
- Posts: 5489
- Joined: Wed Feb 27, 2008 6:24 pm
- Personal rank: Work In Progress
- Location: Liandri
Re: compiling codes
Because they're not loaded. You can only compile your package with the packages which are in the EditPackages list in the UnrealTournament.ini file.
In resume: you have to add the mods containing those classes to the EditPackages list in that same ini.
NOTE: Only add the packages you REALLY REALLY NEED, otherwise the package will "require" more packages than the mod actually needs, so DO NOT play the "smart guy" role and place everything into editpackages lol
In resume: you have to add the mods containing those classes to the EditPackages list in that same ini.
NOTE: Only add the packages you REALLY REALLY NEED, otherwise the package will "require" more packages than the mod actually needs, so DO NOT play the "smart guy" role and place everything into editpackages lol

-
- Masterful
- Posts: 550
- Joined: Fri Aug 28, 2009 3:33 pm
Re: compiling codes
so If I add to much packages to the unrealtournament.ini file, my mod becomes dependent of these files?
-
- Adept
- Posts: 376
- Joined: Wed Feb 13, 2008 9:16 pm
- Location: Cologne
Re: compiling codes
Only if you actually refer to these files. I got a lot of EditedPackages, but I'm always sure that I doesn't refer to them accidently in one of my mods.
Website, Forum & UTStats

******************************************************************************
Nexgen Server Controller || My plugins & mods on GitHub
******************************************************************************

******************************************************************************
Nexgen Server Controller || My plugins & mods on GitHub
******************************************************************************
-
- Godlike
- Posts: 5489
- Joined: Wed Feb 27, 2008 6:24 pm
- Personal rank: Work In Progress
- Location: Liandri
Re: compiling codes
That's odd. I am pretty sure that once you add something in EditPackages "above" your actual mod (packages that get called before your own mod compile) make your mod be dependent on them, either you refer them or not in your mods.Sp0ngeb0b wrote:Only if you actually refer to these files. I got a lot of EditedPackages, but I'm always sure that I doesn't refer to them accidently in one of my mods.
Proof of that is that once I forgot a certain package in EditPackages, sent the mod to an admin, and since the admin didn't have that package, his server crashed complaining about that missing package. The only thing I did to fix it was simply to comment the line of the extra package in question, and recompile the mod, thus the confirmation of this.
You can have a lot of EditPackages there, but unless you comment them out or place them "after" your mod compile order, the mod will be always dependent from them.
-
- Skilled
- Posts: 231
- Joined: Mon Aug 16, 2010 10:25 pm
Re: compiling codes
I think this is correct. I do have relics package in editpackages and the mods that I compile seems don't have it dependency.Sp0ngeb0b wrote:Only if you actually refer to these files. I got a lot of EditedPackages, but I'm always sure that I doesn't refer to them accidently in one of my mods.
-
- Godlike
- Posts: 5489
- Joined: Wed Feb 27, 2008 6:24 pm
- Personal rank: Work In Progress
- Location: Liandri
Re: compiling codes
Well, to clear this doubt up, I made an experiment: created classes and packages A and B, and tested this.
It seems that Sponge and iloveut99 are right, and ucc is smart enough to not create useless dependencies, so I guess I was wrong.
I am wondering now what exactly happenned back then (it happenned as I described, and the difference was also an EditPackage, created a dependency only because it was there... I wonder
).
It seems that Sponge and iloveut99 are right, and ucc is smart enough to not create useless dependencies, so I guess I was wrong.
I am wondering now what exactly happenned back then (it happenned as I described, and the difference was also an EditPackage, created a dependency only because it was there... I wonder

-
- Skilled
- Posts: 165
- Joined: Mon Jan 24, 2011 3:22 am
- Personal rank: Codezilla
Re: compiling codes
Ok I know this is very old topic, but I think I know where the problem arises.
Suppose
1)Package ABC has classes A,B,C
2)Package CDE has classes C,D,E
(both packages have C class common)
now if Package ABC is above package CDE and you compile then unwanted dependency is created
.
Package CDE will require package ABC to run.
Suppose
1)Package ABC has classes A,B,C
2)Package CDE has classes C,D,E
(both packages have C class common)
now if Package ABC is above package CDE and you compile then unwanted dependency is created

Package CDE will require package ABC to run.
Patreon: https://www.patreon.com/FreeandOpenFeralidragon wrote:Trial and error is sometimes better than any tutorial, because we learn how it works for ourselfs, which kills any doubts about anything![]()
-
- Godlike
- Posts: 3772
- Joined: Fri Jan 14, 2011 1:53 pm
- Personal rank: -Retired-
Re: compiling codes
Another point to consider is that if you have EditPackages for some mod, it can also create unintended default settings in the compile if you are dependent on another mod. For example MonsterHunt2 builds a gametype up from Monsterhunt, so it requires an MH dependency. If I leave my MH.ini in the system folder it will save "my" ini settings as the default.
Example:
From MonsterHunt.ini
Now if I leave that and compile from that installation my new mod will have
as the default and if you let the mod generate an ini itself, my password will be out there for all to see.
The moral of this story? Code from a dedicated installation you don't use to play with and REMOVE all unused editpackage lines you do not need. Keep it clean and keep yourself from making a bad mistake.
Example:
From MonsterHunt.ini
Code: Select all
[Engine.GameInfo]
AdminPassword=MySuperSecretPass
GamePassword=
Code: Select all
AdminPassword=MySuperSecretPass
The moral of this story? Code from a dedicated installation you don't use to play with and REMOVE all unused editpackage lines you do not need. Keep it clean and keep yourself from making a bad mistake.
So long, and thanks for all the fish