Thank you ChrisC, now my game doesn't crash anymore when I made Chen and Enchantress control all the neutrals. But I have some questions
Originally Posted by ChrisC
1. I have this error
And this is the line
[VScript] Script Runtime Error: ...a 2 beta\game\dota\scripts\vscripts\bots\bot_generic.lua:460: This object has been deleted from C++ and no longer exists. (Use :IsNull() to detect this.)
[C]: in function 'IsFullyCastable'
...a 2 beta\game\dota\scripts\vscripts\bots\bot_generic.lua:460: in function 'ConsiderShockWave'
...a 2 beta\game\dota\scripts\vscripts\bots\bot_generic.lua:97: in function 'MinionThink'
...beta\game\dota\scripts\vscripts\bots\bot_enchantress.lua:7: in function <...beta\game\dota\scripts\vscripts\bots\bot_enchantress.lua:5>
This error doesn't caused any crash, but what should I add to check in order to make that error disappear? Can I use IsNull() like "... not abilitySW:IsNull() ..." ? BTW, that ability is this "satyr_hellcaller_shockwave" owned by "npc_dota_neutral_satyr_hellcaller".
local npcBot = GetBot();
-- Make sure it's castable
if ( not abilitySW:IsFullyCastable() ) <========== Line 460
return BOT_ACTION_DESIRE_NONE, 0;
2. What does it means?
It makes my game crash in one game, but in another game it works fine even though there is Enchantress in the game. Here is the link to my complete code http://dev.dota2.com/showthread.php?...=1#post1421527. This is line 1 in bot_enchantress.lua
1336(1645.852402): Failed to run script 'C:\Program Files (x86)\Steam\steamapps\common\dota 2 beta\game\dota\scripts\vscripts\bots\bot_enchantress.lua'!
1335(1645.852378): Script Runtime Error: ...beta\game\dota\scripts\vscripts\bots\bot_enchantress.lua:1: attempt to call global 'GetScriptDirectory' (a nil value)
...beta\game\dota\scripts\vscripts\bots\bot_enchantress.lua:1: in main chunk
and here is the dump file
local minion = dofile( GetScriptDirectory().."/MinionUtility" )