Bug when modding gun.gsc
-
Hello.
I'm trying to modify the gun.gsc to make a custom ladder but everytime I get to the last weapon of my custom ladder and get the last kill, instead of the game ending, it just gives me the weapons of the last ladder I played.
I've also tried to use this script from JezuzLizard#include maps/mp/gametypes/gun; #include maps/mp/gametypes/_hud_util; #include maps/mp/_utility; #include common_scripts/utility; init() { level.gunprogression = []; addguntoprogression( "knife_ballistic_mp" ); addguntoprogression( "scar_mp" ); addguntoprogression( "tar21_mp" ); addguntoprogression( "an94_mp" ); addguntoprogression( "type95_mp" ); addguntoprogression( "xm8_mp" ); addguntoprogression( "sig556_mp" ); addguntoprogression( "sa58_mp" ); addguntoprogression( "saritch_mp" ); addguntoprogression( "hamr_mp" ); addguntoprogression( "lsat_mp" ); addguntoprogression( "qbb95_mp" ); addguntoprogression( "mk48_mp" ); addguntoprogression( "svu_mp" ); addguntoprogression( "as50_mp" ); addguntoprogression( "dsr50_mp" ); addguntoprogression( "ballista_mp+is" ); addguntoprogression( "usrpg_mp" ); addguntoprogression( "crossbow_mp" ); addguntoprogression( "knife_ballistic_mp" ); level.gungamekillscore = maps/mp/gametypes/_rank::getscoreinfovalue( "kill_gun" ); registerscorelimit( level.gunprogression.size * level.gungamekillscore, level.gunprogression.size * level.gungamekillscore ); setdvar( "scr_xpscale", 0 ); setdvar( "ui_weapon_tiers", level.gunprogression.size ); makedvarserverinfo( "ui_weapon_tiers", level.gunprogression.size ); }
but the game shows me this error when I try to start the match.
-
zeroconz For this script to work you have to change every / to a \ unless its part of a comment
-
zeroconz Make sure you are using scripts from here https://github.com/plutoniummod/t6-scripts/blob/main/MP/Core/maps/mp/gametypes/gun.gsc
These scripts are properly decompiled and compatible with the compiler we use and also don't have any bugs in them.
-
chicken emoji I've changed the / to \ and now I get this
-
zeroconz It works for me. Are you sure you also changed it in this line?
level.gungamekillscore = maps\mp\gametypes\_rank::getscoreinfovalue( "kill_gun" );
-
JezuzLizard I've tried and it keeps happening the same thing
-
zeroconz What does your code look like you probably changed it since the original doesn't have that many lines
-
chicken emoji yep, my bad. Now it works just fine. Thank you so much, I've trying to solve this shit for a week and I just couldn't find that.