NOPE, and Do NOT expect me to "return" anything from now on, unless I do some conforming stunts. I WROTE code using LABELS on purpose and not copied from nowhere. Do they work ? YES ! Does they do Accessed Nones ? NO ! Then ? And where is the bug here or what is so bad ? Light me with some logic... All craps written by me are operational at this moment.Feralidragon wrote:could simply be:
Code: Select all
if (aPawn == None || aPawn.bDeleteMe) { return; } //code
Did I say the these codes are not for reusing ? I have a template from where I load needs modified for any particular situation. THESE are ONE PURPOSE usage codes NOT Mutators. Ah, yes, I could remove some brackets because I don't need them .
Maps patched with these modules are working properly, like I said go and see yourself, these debates are pointless if you don't even look at what I mean.
You can toy with "returns" and "objects" as much as you want, I have MY OWN way - proved functional more than 100 times - NO GAME CRASH, and no borks encountered.
Aside, as I could see so far only your way is better even if my way did not damaged anything. Evidences are hundreds of matches which I was playing with no issues.
Assuming you think these are not working I go back to my working table for next modules because I don't need to setup more blabbering with no purpose.
Some of those latest MapVote mutators are done having a lot of labels and... they are working better than LA13 - they are the heart of a server working with no problems. Never mind... see you in autumn, I have work to do here...
But I might have another stuff to present for those interested.
Snippet from a packager also tested and operational:
Code: Select all
final function ScanAndSetGame()
{
if ( GmType[0] == "" )
SaveConfig();
if (Caps(string(Outer.Name)) ~= "UT-LOGO-MAP")
{
log ("Packages are skipped for this map...",'ServPackager');
GoTo SkipSetup;
}
i = 0;
for (i = 0; i < 32; i++)
{
if ( string(Level.Game.Class.Name) ~= GmType[i] )
{
log ("Found game-type"@GmType[i],'ServPackager');
SetupPacks(i);
break;
}
}
SkipSetup:
}
And here too:
Code: Select all
event PreBeginPlay()
{
local String Day;
local int I;
local string str;
str = String(Outer.Name);
if ( str != "MH-LandsOfNapali" )
{
bDisabled = True;
log ("Another map type"@str@has triggered loading patch files but it's not original map...);
log ("Patch module will self deactivate.");
}
if ( bDisabled )
GoTo Done;
I = Len(str)-3;
str = Right(str,I);
SetPropertyText("LTag",str);
log(Self.name@Patching Level.,LTag);
G = Spawn( class'PathsActor' );
AddMHObjectives();
InitPriorities();
// ChangeNastyActors();
SpawnShoters();
I = Level.DayOfWeek;
switch(I)
{
case 0: Day = "Sunday"; break;
case 1: Day = "Monday"; break;
case 2: Day = "Tuesday"; break;
case 3: Day = "Wednesday"; break;
case 4: Day = "Thursday"; break;
case 5: Day = "Friday"; break;
case 6: Day = "Saturday"; break;
}
log ("Today is "$Day$".",LTag);
if ( I > 0 && I < 5 )
log ("Map is running with normal patch",LTag);
if ( I == 0 || I >= 5 )
{
log ("Master Patcher wants to run map as Week-End Version!",LTag);
log ("Attempt to find Week-End add-on...",LTag);
AddWeekEndStuff();
}
InitialState='PathsMapping';
Done:
log ("PreBeginPlay Completed...",LTag);
}