Talk:API SetCVar

Back to page

104,635pages on
this wiki
Add New Page

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

locale Edit

This seems to require a client restart to take effect (not a UI reload).

SetCVar("locale", locale)

Do not overwrite this function! Edit

Do not overwrite this function! You'll have a very hard time finding the reason for those nasty "sry, your addon was blocked cause it called a secure function" errors.

My example: hitting the escape key should just open the game menu. If you overwrite SetCVar you'll get the error each time you press Esc (except when closing a window). The error is released by the Blizzard UI functions API_SpellStopCasting, API_SpellStopTargeting and API_ClearTarget, because they appear in API_ToggleGameMenu. I've got no idea why SetCVar is called between hitting Esc and reaching API_ToggleGameMenu. -- Ohklus

Try doing this to see when and what is happening with this function:
hooksecurefunc("SetCVar", function(a, b, c)
    ChatFrame1:AddMessage(tostring(a) .. ", " .. tostring(b) .. ", " .. tostring(c))

Posted by: EGingell (T|C|F) on 10:40, 22 July 2008 (UTC)

Also on Fandom

Random Wiki