Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 25

Thread: February 27 Bot Update

  1. #11
    Basic Member
    Join Date
    Jan 2017
    Posts
    25
    After today's update, I cannot seem to update my bot script. It used to show "ExtremePush" (my bot's name) and I can upload and update the description. Now it only shows a blank asking me create a workshop page.

    Screenshot_2.png

  2. #12
    Great! I think it would be useful to somewhat separate custom games from custom bots in the workshop since they are fundamentally different from custom games and also bots need some attention boost!

  3. #13
    Valve Developer
    Join Date
    Sep 2011
    Posts
    1,665
    We'll have the issues with selecting and updating scripts fixed in the next update.

  4. #14
    Valve Developer
    Join Date
    Sep 2011
    Posts
    1,665
    @arz_on4dt :

    1. I think you can just check that it's not nil? When you see that message, it means that the unit has died and its abilities have been deleted, so you can no longer call functions on them.
    2. That looks like the C++ side of scripting hasn't initialized correctly? Do you know what causes you to get that error?

  5. #15
    Basic Member
    Join Date
    May 2014
    Posts
    227
    Quote Originally Posted by ChrisC View Post
    @arz_on4dt :

    1. I think you can just check that it's not nil? When you see that message, it means that the unit has died and its abilities have been deleted, so you can no longer call functions on them.
    2. That looks like the C++ side of scripting hasn't initialized correctly? Do you know what causes you to get that error?
    1. Which one is better, put it in variable initialization or in Consider* function? I've done the first one but it's still showed up the error. I haven't tried the 2nd one though.
    Code:
    if abilitySW == nil or abilitySW == "" then abilitySW = hMinionUnit:GetAbilityByName( "satyr_hellcaller_shockwave" ); end
    or
    Code:
    if  ( abilitySW == nil or not abilitySW:IsFullyCastable() )
    2. I don't know. The game has run for more than 20 minutes when suddenly it's just crash with no script error in the console. After I look at the crash dump file that's what I got. Is it possible if this caused by my local host server hiccup? Sometimes I got no connection on my steam because of my unstable internet connection?

  6. #16
    Basic Member
    Join Date
    Dec 2016
    Posts
    611
    Quote Originally Posted by arz_on4dt View Post
    1. Which one is better, put it in variable initialization or in Consider* function? I've done the first one but it's still showed up the error. I haven't tried the 2nd one though.
    Code:
    if abilitySW == nil or abilitySW == "" then abilitySW = hMinionUnit:GetAbilityByName( "satyr_hellcaller_shockwave" ); end
    or
    Code:
    if  ( abilitySW == nil or not abilitySW:IsFullyCastable() )
    I would do this:
    Code:
    function ConsiderShockWave(hMinionUnit)
        if hMinionUnit:IsNull() then return BOT_ACTION_DESIRE_NONE, 0 end
        ...

  7. #17
    Basic Member
    Join Date
    May 2014
    Posts
    227
    Quote Originally Posted by nostrademous View Post
    I would do this:
    Code:
    function ConsiderShockWave(hMinionUnit)
        if hMinionUnit:IsNull() then return BOT_ACTION_DESIRE_NONE, 0 end
        ...
    Will it do the same instead of put it in each consider function?
    Code:
    function MinionThink(hMinionUnit)
        if not hMinionUnit:IsNull() then
    	if hMinionUnit:IsIllusion() then
            ...
            elseif hMinionUnit:GetUnitName() == "npc_dota_neutral_centaur_khan" then
            ...
            end
        end
    end
    Last edited by arz_on4dt; 02-28-2017 at 10:35 AM.

  8. #18
    Basic Member
    Join Date
    Dec 2016
    Posts
    611
    Quote Originally Posted by arz_on4dt View Post
    Will it do the same instead of put it in each consider function?
    Code:
    function MinionThink(hMinionUnit)
        if not hMinionUnit:IsNull() then
    	if hMinionUnit:IsIllusion() then
            ...
            elseif hMinionUnit:GetUnitName() == "npc_dota_neutral_centaur_khan" then
            ...
            end
        end
    end
    That's even better I would say. Since all the code will get executed in a single frame anyways, you really only need to check once.

  9. #19
    Valve Developer
    Join Date
    Sep 2011
    Posts
    1,665
    I don't know what the entirety of your code looks like, but I think I agree with nostrademous -- basically I'd push the nil check up as high as possible.

    On that "attempt to call global 'GetScriptDirectory' (a nil value)" error, that happens after the game's been running for 20 minutes?! That's bizarre, sounds maybe like a memory corruption, or a corruption in handles. Or something causing the script VM to shut down. GetScriptDirectory should definitely be callable at absolutely any time. I'll take a look at the dumpfile and see if I can spot anything.

  10. #20
    Basic Member
    Join Date
    Dec 2016
    Posts
    611
    Quote Originally Posted by ChrisC View Post
    I don't know what the entirety of your code looks like, but I think I agree with nostrademous -- basically I'd push the nil check up as high as possible.

    On that "attempt to call global 'GetScriptDirectory' (a nil value)" error, that happens after the game's been running for 20 minutes?! That's bizarre, sounds maybe like a memory corruption, or a corruption in handles. Or something causing the script VM to shut down. GetScriptDirectory should definitely be callable at absolutely any time. I'll take a look at the dumpfile and see if I can spot anything.
    I had never had that GetScriptDirectory() issue happen and I have sat through a lot of bot games with my bots playing while the Valve and Steam services were in various states... (i.e., went down, reconnected ,etc.)

Posting Permissions

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