WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Target's Portrait (https://www.wowinterface.com/forums/showthread.php?t=33859)

Blia 07-11-10 02:18 AM

Target's Portrait
 
Hello.

I am trying to add the Target's Portrait inside my addon.
To do this, I borrowed the code from InspectFrame.

It almost works but I get an error related to "self".

I am very new to addon development I am completely lost.
If someone could help me, I would appreciate a lot.


**removed**

See you.

Rilgamon 07-11-10 02:59 AM

This looks more like a try to advertise a spamsite.

Blia 07-11-10 03:51 AM

Please don't say it's a spam when it's not..

2shared is just a file hosting website like rapidshare and so..
By the way, here is the rapidshare link .. since you seem to dislike 2shared.. **removed**

Here is the code of this addon :
TOC : http://pastebin.com/cjSwwN8X
XML : http://pastebin.com/UTtSiJNk
TestPortrait.lua : http://pastebin.com/Qp3WdwBT
Test.Lua : http://pastebin.com/6nHaMdgc


Thank you.

Rilgamon 07-11-10 06:15 AM

Following your first link I was not able to find a download with all the blinking spam.

Looking at your code you call your scriptfiles at least twice.
Once in the toc and once it the xml ... you should remove one call.

mankeluvsit 07-11-10 06:16 AM

you're not allowed to post offsite links.
so on that note no one will help you.

Rilgamon 07-11-10 06:23 AM

For your 3 "self" errors ... search the three calls of the functions that
throw the error in testPortrait.lua ... all three are called from your xml without
the self argument.

Blia 07-11-10 10:22 AM

Quote:

Originally Posted by Rilgamon (Post 196933)
Following your first link I was not able to find a download with all the blinking spam.

I am really sorry for that. All my appologizes. :(

Quote:

Originally Posted by Rilgamon (Post 196933)
Looking at your code you call your scriptfiles at least twice.
Once in the toc and once it the xml ... you should remove one call.

Thanks for the hints Rilgamon, I'll remove one of them.

Quote:

Originally Posted by mankeluvsit (Post 196934)
you're not allowed to post offsite links.
so on that note no one will help you.

Oh, sorry, sorry. I didn't know.
So now, nobody's going to help me ? :( Even though I added codes on pastebin..

Quote:

Originally Posted by Rilgamon (Post 196935)
For your 3 "self" errors ... search the three calls of the functions that
throw the error in testPortrait.lua ... all three are called from your xml without
the self argument.

Thank you a lot, Rilgamo, you're very helpful.

Seerah 07-11-10 11:02 AM

Quote:

Originally Posted by Blia (Post 196956)
Oh, sorry, sorry. I didn't know.
So now, nobody's going to help me ? :( Even though I added codes on pastebin..

pastebin links are fine. :) But we cannot vouch for the security of downloads from external sites, hence the rule. :)

/edit: pastebin (or similar) links are actually great - because then we can see line numbers and someone else can put up a reply to your code.

Rilgamon 07-11-10 11:30 AM

Quote:

Originally Posted by Blia (Post 196956)
Oh, sorry, sorry. I didn't know.
So now, nobody's going to help me ? :( Even though I added codes on pastebin..

We're here to help where we can ... but following links to uncertain destination
is dangerous these days. It's not your fault that the net is like it is ;)

Sythalin 07-11-10 11:44 AM

Quote:

Originally Posted by Seerah (Post 196960)
pastebin links are fine. :) But we cannot vouch for the security of downloads from external sites, hence the rule. :)

/edit: pastebin (or similar) links are actually great - because then we can see line numbers and someone else can put up a reply to your code.

Similar post layouts can be done here as well if you use the [highlight=lua] wrapper around your code.

Example:
lua Code:
  1. local f = CreateFrame("Frame")
  2. f:SetScript("OnEvent", function(self, event, ...) if f[event] then return f[event](self, event, ...) end end)
  3. f:RegisterEvent("ADDON_LOADED")
  4. f:RegisterEvent("PLAYER_ENTERING_WORLD")
  5. f:RegisterEvent("UNIT_EXITED_VEHICLE")
  6. f:RegisterEvent("PLAYER_TALENT_CHANGED")
  7. f:Show()

Seerah 07-11-10 03:16 PM

This is true, but if you're code is lengthy (or contains long lines), then pastebin or pastey is still better. :)


All times are GMT -6. The time now is 12:45 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI