Results 1 to 5 of 5

Thread: Problem loading some mods on server.

  1. #1

    Default Problem loading some mods on server.

    hey guys,

    im executing some mods form dmprecache... but sometimes the mod loads... and sometimes it doesnt... any idea?.

    Code:
    main:
    
    	
    if (level.hascached != 1){
    level.hascached = int 1
    cache models/weapons/colt45.tik
    cache models/weapons/p38.tik
    cache models/weapons/silencedpistol.tik
    cache models/weapons/m1_garand.tik
    cache models/weapons/kar98.tik
    cache models/weapons/kar98sniper.tik
    cache models/weapons/springfield.tik
    cache models/weapons/thompsonsmg.tik
    cache models/weapons/mp40.tik
    cache models/weapons/mp44.tik
    cache models/weapons/bar.tik
    cache models/weapons/bazooka.tik
    cache models/weapons/panzerschreck.tik
    cache models/weapons/shotgun.tik
    cache models/weapons/m2frag_grenade.tik
    cache models/weapons/steilhandgranate.tik
    cache models/player/allied_airborne.tik
    cache models/player/allied_airborne_fps.tik
    cache models/player/allied_manon.tik
    cache models/player/allied_manon_fps.tik
    cache models/player/allied_oss.tik
    cache models/player/allied_oss_fps.tik
    cache models/player/allied_pilot.tik
    cache models/player/allied_pilot_fps.tik
    cache models/player/american_army.tik
    cache models/player/american_army_fps.tik
    cache models/player/american_ranger.tik
    cache models/player/american_ranger_fps.tik
    cache models/player/german_afrika_officer.tik
    cache models/player/german_afrika_officer_fps.tik
    cache models/player/german_afrika_private.tik
    cache models/player/german_afrika_private_fps.tik
    cache models/player/german_elite_gestapo.tik
    cache models/player/german_elite_gestapo_fps.tik
    cache models/player/german_elite_sentry.tik
    cache models/player/german_elite_sentry_fps.tik
    cache models/player/german_elite_sentry_fps.tik
    cache models/player/german_kradshutzen.tik
    cache models/player/german_kradshutzen_fps.tik
    cache models/player/german_panzer_grenadier.tik
    cache models/player/german_panzer_grenadier_fps.tik
    cache models/player/german_panzer_obershutze.tik
    cache models/player/german_panzer_obershutze_fps.tik
    cache models/player/german_panzer_shutze.tik
    cache models/player/german_panzer_shutze_fps.tik
    cache models/player/german_panzer_tankcommander.tik
    cache models/player/german_panzer_tankcommander_fps.tik
    cache models/player/german_scientist.tik
    cache models/player/german_scientist_fps.tik
    cache models/player/german_waffenss_officer.tik
    cache models/player/german_waffenss_officer_fps.tik
    cache models/player/german_waffenss_shutze.tik
    cache models/player/german_waffenss_shutze_fps.tik
    cache models/player/german_wehrmacht_officer.tik
    cache models/player/german_wehrmacht_officer_fps.tik
    cache models/player/german_wehrmacht_soldier.tik
    cache models/player/german_wehrmacht_soldier_fps.tik
    cache models/player/german_winter1.tik
    cache models/player/german_winter1_fps.tik
    cache models/player/german_winter2.tik
    cache models/player/german_winter2_fps.tik
    cache models/player/german_worker.tik
    cache models/player/german_worker_fps.tik
    
    
    
    	//REBORN EVENT REGISTERING
    	local.result = registerev "connected" global/connectedhandler.scr
    	//local.result = registerev "disconnected" global/disconnectionhandler.scr
    	
    //call UP scripts
    //exec server/server_initialize.scr
    //---------------------------------
    
    
    level waittill spawn
    exec global/antinamechange.scr
    exec global/consolemessage.scr
    exec custom/mapinfo/mapinfo.scr
    exec global/speckick.scr
    
    
    
    }
    end
    for example the antinamechange doesnt work all the time

  2. #2

    Default

    Maybe the mods you have dont execute properly next to level waittill spawn.

    I have 3 mods running before of him and they work every time.

    The map info have next to him because is only when a player join the server.

    My script is like this and they all work every time:


    main:
    //local.result3 = registerev "connected" global/messague.scr

    cache models/weapons/colt45.tik
    cache models/weapons/p38.tik
    cache models/weapons/silencedpistol.tik
    cache models/weapons/m1_garand.tik
    cache models/weapons/kar98.tik
    cache models/weapons/kar98sniper.tik
    cache models/weapons/springfield.tik
    cache models/weapons/thompsonsmg.tik
    cache models/weapons/mp40.tik
    cache models/weapons/mp44.tik
    cache models/weapons/bar.tik
    cache models/weapons/bazooka.tik
    cache models/weapons/panzerschreck.tik
    cache models/weapons/shotgun.tik
    cache models/weapons/m2frag_grenade.tik
    cache models/weapons/steilhandgranate.tik
    cache models/player/allied_airborne.tik
    cache models/player/allied_airborne_fps.tik
    cache models/player/allied_manon.tik
    cache models/player/allied_manon_fps.tik
    cache models/player/allied_oss.tik
    cache models/player/allied_oss_fps.tik
    cache models/player/allied_pilot.tik
    cache models/player/allied_pilot_fps.tik
    cache models/player/american_army.tik
    cache models/player/american_army_fps.tik
    cache models/player/american_ranger.tik
    cache models/player/american_ranger_fps.tik
    cache models/player/german_afrika_officer.tik
    cache models/player/german_afrika_officer_fps.tik
    cache models/player/german_afrika_private.tik
    cache models/player/german_afrika_private_fps.tik
    cache models/player/german_elite_gestapo.tik
    cache models/player/german_elite_gestapo_fps.tik
    cache models/player/german_elite_sentry.tik
    cache models/player/german_elite_sentry_fps.tik
    cache models/player/german_elite_sentry_fps.tik
    cache models/player/german_kradshutzen.tik
    cache models/player/german_kradshutzen_fps.tik
    cache models/player/german_panzer_grenadier.tik
    cache models/player/german_panzer_grenadier_fps.tik
    cache models/player/german_panzer_obershutze.tik
    cache models/player/german_panzer_obershutze_fps.tik
    cache models/player/german_panzer_shutze.tik
    cache models/player/german_panzer_shutze_fps.tik
    cache models/player/german_panzer_tankcommander.tik
    cache models/player/german_panzer_tankcommander_fps.tik
    cache models/player/german_scientist.tik
    cache models/player/german_scientist_fps.tik
    cache models/player/german_waffenss_officer.tik
    cache models/player/german_waffenss_officer_fps.tik
    cache models/player/german_waffenss_shutze.tik
    cache models/player/german_waffenss_shutze_fps.tik
    cache models/player/german_wehrmacht_officer.tik
    cache models/player/german_wehrmacht_officer_fps.tik
    cache models/player/german_wehrmacht_soldier.tik
    cache models/player/german_wehrmacht_soldier_fps.tik
    cache models/player/german_winter1.tik
    cache models/player/german_winter1_fps.tik
    cache models/player/german_winter2.tik
    cache models/player/german_winter2_fps.tik
    cache models/player/german_worker.tik
    cache models/player/german_worker_fps.tik
    waitexec global/ip2co/arrays.scr
    exec server/server_initialize.scr

    //exec global/snow.scr
    //exec global/main.scr
    if(level.loaded != 1)
    {
    exec soundfix/mapswitch.scr
    exec global/check_name.scr
    exec global/spec_check.scr
    level.loaded = 1
    }
    level waittill spawn
    exec custom/mapinfo/mapinfo.scr

    end

  3. #3

    Default

    i think it has something to do with the

    Code:
    	//REBORN EVENT REGISTERING
    	local.result = registerev "connected" global/connectedhandler.scr
    	//local.result = registerev "disconnected" global/disconnectionhandler.scr

  4. #4
    Developer Todesengel's Avatar
    Join Date
    Dec 2013
    Location
    St. Louis, Missouri, USA
    Posts
    276

    Default

    Quote Originally Posted by Slimbips {sfx} View Post
    i think it has something to do with the

    Code:
    	//REBORN EVENT REGISTERING
    	local.result = registerev "connected" global/connectedhandler.scr
    	//local.result = registerev "disconnected" global/disconnectionhandler.scr
    I’m sitting in doc office, so can’t test. But I suspect doublekill is right on with his comment that your levelwait can be the issue. You need to be very careful what you put in dmprecache, as levelwaits are often done in the map script and by putting it in dmprecache you are stepping on assumptions the map script is making. That is my understanding anyways.

    You register event seems correct, but why not drop in a print to see result of the call?

    Also, I suggest you drop in pe’s event handler, just to ensure if two mods are both wanting to use the connected event that it still works. Otherwise, last register wins.

  5. #5
    Developer Todesengel's Avatar
    Join Date
    Dec 2013
    Location
    St. Louis, Missouri, USA
    Posts
    276

    Default

    I thought of something else to check. Mods called from dmprecache generally dont just simply fail to execute (unless it's a typo or smth). Is it possible that those mods have cvars that enable them inside the mod script? Your problem may have nothing to do with that dmprecache or levelwait.

    What I have seen happen before is that when dmprecache and it's children (mods you exec from there) are executing, it is entirely possible that your server.cfg file has not been completely read and/or processed yet. If you have mods that use cvars to enable/disable (mod1_enable, mod2_enable, etc) and those cvars are set in server.cfg (and it's not quite baked yet) - some mods will execute and some will not because the modX_enable flag hasn't been set yet.

    To see if this is the issue, in each of your mods print a line stating the current value of the enable flag before it is tested or set. When your server starts up, you may well see some of the _enable cvars are 0 when you expected them to be 1 from server.cfg.

    To combat this and ensure you never have the problem again, put this at the very top of server.cfg before anything else:
    Code:
    // Todesengel Fix For asynch thread issues - Part 1/3
    //////////////////////////////////////////////////////////////
    set configdone 0
    and at the very bottom of server.cfg after everything else:
    Code:
    // Todesengel Fix For asynch thread issues - Part 2/3
    //////////////////////////////////////////////////////////////
    set configdone 1
    And finally, in dmprecache, after your caching section where you precache deathmatch stuff, but before you call any of your mods, put this:
    Code:
    // Todesengel Fix For asynch thread issues - Part 3/3
    ////////////////////////////////////////////////////////////
    while(getcvar(configdone) != "1") waitframe
    What this does is force your mods to wait before initializing, until it is for sure that everything in server.cfg has finished first. In short, this is a timing problem, as things don't happen synchronously when starting up. It appears that the necessity of using this approach has to do with just how big your server.cfg file is, and what all other things are going on at the moment. So you may not think you need this fix right now, but at some point you may well hit it. You don't need my name in the comments, that's just what I have in my server.cfg that I pasted in

    Tode



    ~

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •