Jump to content

Digest October-December

We talk about what was done and updated in the past month. We help keep abreast of events.

December November October

Servers monitoring and the Addons Editor

We present you two legends. All dreams come true.

Servers monitoring The Addons Editor

A statistics bot for Telegram

Convenient analytics right on your phone.

Read more

Game tooltips

Tooltips provide a way for 3rd party fansites and extensions to display detailed information on mouseover.

Read more

The Addons Updater

Let us to introduce the addons updating software and to share the details

Read more Download

Сравнение WString


JeStoneDev

Recommended Posts

Прошу прощение за скорее всего глупейший вопрос. Lua не занимался, но встала задача и ее надо решить =) Есть кусок кода:


local leaderName = raid.GetLeaderName()
local detectedObjects = avatar.GetDetectedObjects()
for i, objectId in detectedObjects do
  if object.IsUnit( objectId ) then
local unitName = object.GetName( objectId )
if leaderName == unitName then
--юнит является лидером рейда
end
end
end

Все отлично отрабатывает до условия.

if leaderName == unitName then

Почему данное условие может не отрабатывать при том, что leaderName действительно содержит тот же никнейм, что и unitName (в этом я на 100% уверен, т.к. делал логирование всего цикла в чат и при этом на одной из итерации ник лидера совпадал с ником юнита, но условие при этом не выполнялось ни в какую).

Заранее спасибо за совет

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using our site you agree to the Terms of Use