Thread Tools Display Modes
07/16/20, 02:42 AM   #1
xicolimo
Join Date: Jul 2020
Posts: 1
Problems with GetInfamyLevel()

I am having trouble getting useful information out of the function GetInfamyLevel(). No matter what I do, it always returns that I am at infamy level "0" which means it thinks I am Upstanding. I can have the Kill On Sight active and when I use the code snippit below, it returns an infamy level of "0", meaning I am Upstanding. Which obviously I am not since the guards are beating on me while I run the code. It seems no matter what level of bounty I have, or if the guards are hitting me with sharp pointy objects and deadly spells, the function GetInfamyLevel() always cheerfully replies that I have an Infamy level of "0" which corresponds to INFAMY_THRESHOLD_UPSTANDING. Yay me!!

I am probably missing something really simple.

The code below is embedded in a slash command so I can check it at any time by sending the slash command.

local infamyNumber = GetInfamyLevel()
d("Infamy Level: " .. infamyNumber)
if infamyNumber == INFAMY_THRESHOLD_DISREPUTABLE then
d("Disreputable")
elseif infamyNumber == INFAMY_THRESHOLD_UPSTANDING then
d("Upstanding")
elseif infamyNumber == INFAMY_THRESHOLD_NOTORIOUS then
d("Notorious")
elseif infamyNumber == INFAMY_THRESHOLD_FUGITIVE then
d("Fugitive")
end

new porn and reviews on them appear first here https://freeadultpornlist.com

Last edited by xicolimo : 05/05/21 at 11:44 PM.
  Reply With Quote
07/16/20, 03:10 AM   #2
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,566
You are using it wrong. One look at the ESOUIDocumentation.txt tells me that it takes a parameter "infamityAmount". Looking a few entries above, I also see a function "GetInfamity" which returns an integer, so I suppose you have to use it like so:
Lua Code:
  1. local infamyNumber = GetInfamyLevel(GetInfamy())

p.s. code questions should go into the developer forums. This one here is for addon support questions.
  Reply With Quote

ESOUI » AddOns » AddOn Help/Support » Problems with GetInfamyLevel()

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off