Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

defense is broken (again?) #184

Closed
Keithenneu opened this issue Mar 27, 2017 · 11 comments
Closed

defense is broken (again?) #184

Keithenneu opened this issue Mar 27, 2017 · 11 comments

Comments

@Keithenneu
Copy link
Contributor

gotta fix this before I can move on to pushing.

@Nostrademous
Copy link
Owner

Yeah, I noticed it isn't working. Also noticed that using TPs is not working.

At least no more crashes.

@Nostrademous
Copy link
Owner

I'll fix TP use as soon as I verify that all my updates to Invoker (ported him to the same ability Use format as all the other heroes) is bug-free.

@Keithenneu
Copy link
Contributor Author

Keithenneu commented Mar 27, 2017

Looks like the usage of enemy_data is the issue.
How is it supposed to work now? Without enemy.Obj I suppose?
utils.ValidTarget(enemy) crashes with attempt to call method 'IsNull' (a nil value) though.
All I need to get is the location. utils.ValidTarget(enemy) ensures that I can call enemy:GetLocation(), right?

@Nostrademous
Copy link
Owner

Nostrademous commented Mar 27, 2017

yeah. enemy.Obj doesn't exist. It was causing all kinds of crashes with illusions in prior code.

utils.ValidTarget(hUnit) ensure you have a valid target that can have all the API's on it called.

@Keithenneu
Copy link
Contributor Author

So enemy_data won't contain any handles, and I have to get them myself?

@Nostrademous
Copy link
Owner

yeah, just use GetUnitList() for that. enemy_data will contain info about enemies (index/based-of enemy Player IDs) such as what items they had last time we saw them, etc.

@Keithenneu
Copy link
Contributor Author

K

@Keithenneu
Copy link
Contributor Author

Keithenneu commented Mar 27, 2017

In defendlane.lua:

function X:OnStart(myBot)
    local bot = GetBot()
    bot.defendLane = true
end

However, bot.defendLane is also the mode implementation.
I'll just rename the variable for now. But getting a wider solution might become necessary.

Edit: Can't find a place where the variable is used oO

@Nostrademous
Copy link
Owner

I think we just need a standardized naming convention so we don't trample on each other.

@Nostrademous
Copy link
Owner

about to push some changes to fix TP use - FYI

@Keithenneu
Copy link
Contributor Author

PR #185 should hotfix defense.
Still needs lots of improvements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants