• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

[Mutator] Total Game Balance + Gunslinger Perk (ScrN Balance)

hey

hey

hey poosh, im sorry to do this, but i got a question...

Im new to modding for kf, wanted my own server so i started it up, however, i dont want the full mod... So im trying to use just the gunslinger and i got it working for the most part, cept cowboy mode....


Code:
static function bool CheckCowboyMode(KFPlayerReplicationInfo KFPRI, optional class<Weapon> WeapClass)
{
    local Pawn p;

    p = PlayerController(KFPRI.Owner).Pawn;
	
    //if ( p == none || p.ShieldStrength >= 26 || GetClientVeteranSkillLevel(KFPRI) < 3 ) 
	//	return false;
    if ( p == none || p.ShieldStrength >= 26 || KFPRI.ClientVeteranSkillLevel < 3 ) 
		return false;
    if ( WeapClass == none && p.Weapon != none ) 
		WeapClass = p.Weapon.class;
    
    // if custom weapon has "*" bonus switch
    //if ( ClassIsInArray(default.SpecialWeapons, WeapClass ) )
	if ( ClassIsInArray(ServerPerksP.DualMK24, WeapClass ) )

        return true;
	
    return ClassIsChildOf(WeapClass, class'Dualies');
}

The error is this... Gunslinger.uc<490> : Error, Bad or missing expression in 'IF'
and line 490 is
if ( ClassIsInArray(ServerPerksP.DualMK24, WeapClass ) )


If you could tell me how to fix this, i would be truly grateful.
 
Upvote 0
It is much easier to use the full mod and turn off features you don't like (and most of them can be done from config, without need of additional coding) rather than tearing off some parts.

I know, its just, i started already without it, and dont wanna have to go back and start all over ya know. If you wish to not help, thats fine, ill keep messing with it till it works. Thanks either way.
 
Upvote 0
This doesn't look right "ServerPerksP.DualMK24". This is for the MK23? The Dual MK23? Then the refs for it need to be "DualMK23Pistol" or it will throw an error as you have seen. However if there is really an MK24 out there that I am not aware of then I would double check the exact notation for the item.

Its not "out there", friend was helping me with it and we had to use a hackery version to do this. Meaning we copyed all the mk23 files and renamed to mk24's cause "the extending didnt work he said" and he doesnt know how to fix the cowboy mode either so thats why i asked here. Cowboy mode is cool, and its about the only reason i want scrn balance honestly. And since i have already got other coding done and setup, i rather not start over thus why im asking for a fix/help to fix
 
Upvote 0
hey poosh, im sorry to do this, but i got a question...

Im new to modding for kf, wanted my own server so i started it up, however, i dont want the full mod... So im trying to use just the gunslinger and i got it working for the most part, cept cowboy mode....

I already see many many problems with your code, first ServerPerksP.MK23Pistol, that does not exist ServerPerksP holds the perks for ServerPerks, and second ClassIsInArray, MK23 is a weapon and not an array so that will always fail
 
Upvote 0
I already see many many problems with your code, first ServerPerksP.MK23Pistol, that does not exist ServerPerksP holds the perks for ServerPerks, and second ClassIsInArray, MK23 is a weapon and not an array so that will always fail

The way the freind taught me, Mk24Pistol is inside ServerPerksP, http://i.imgur.com/KLJuaUh.png I dont fully know what im doing and cant seem to find any real guides, just winging with a freinds help
 
Upvote 0
Upvote 0
Upvote 0
Upvote 0
<a href="http://steamcommunity.com/groups/ScrNBalance/discussions/2/846943082517732682/" target="_blank">http://steamcommunity.com/groups/ScrNBalance/discussions/2/846943082517732682/
<a href="http://steamcommunity.com/groups/ScrNBalance/discussions/2/828925849157563977/" target="_blank">http://steamcommunity.com/groups/ScrNBalance/discussions/2/828925849157563977/

You need to install original files too (weapon data).

ScrnBalanceSrv: Custom weapon ScrnBalanceSrv.ScrnSPSniperRifle loaded for ScrnBalanceSrv.ScrnVetSharpshooter perk.
ScrnBalanceSrv: Can't load Custom Weapon: 'ScrnBruteGunnerPNW.BruteAUG_A1ARPickup'!
ScrnBalanceSrv: Can't load Custom Weapon: 'ScrnBruteGunnerPNW.BruteSA80LSWPickup'!
ScrnBalanceSrv: Can't load Custom Weapon: 'ScrnBruteGunnerPNW.BruteThompsonPickup'!
ScrnBalanceSrv: Can't load Custom Weapon: 'ScrnBruteGunnerPNW.BruteRPK47Pickup'!
ScrnBalanceSrv: Can't load Custom Weapon: 'ScrnBruteGunnerPNW.BrutePKMPickup'!
ScrnBalanceSrv: Can't load Custom Weapon: 'ScrnBruteGunnerPNW.StingerPickup'!
ScrnBalanceSrv: Can't load Custom Weapon: 'ScrnBruteGunnerPNW.BruteM249Pickup'!
ScrnBalanceSrv: Can't load Custom Weapon: 'ScrnBruteGunnerPNW.BruteM41APickup'!
ScrnBalanceSrv: Can't load Custom Weapon: 'ScrnBruteGunnerPNW.BruteChainGunPickup'!

:(
I dont' know reason...
Let me explain why...
]Please give me a blow by blow account~:D
 
Upvote 0