Thread Tools Display Modes
08-04-07, 05:33 AM   #1
Hanabul
A Defias Bandit
Join Date: Aug 2007
Posts: 2
ICU has an error Cursor_offset_X' (a nil value)

I had posted in the interface help section before I saw this section .. . If I can remember right it says it is " trying to assign an arithmetic value to global settings" .
I downloaded the newest version I could find , but still have same error..the only differance between newer and old ver's is the line number that has the error. I looked at my .lua file and i think this is the area it is referring too..just a guess mind you on my part as I am no debugger .

function ICU_Minimap_OnClick_Event()
if( IsShiftKeyDown() ) then
-- SHIFT key is pressed, returns control to original function.
lOriginal_Minimap_OnClick_Event();
else
-- Shift key is up
if ( GameTooltip:IsVisible() ) then

-- Grab the cursor x/y position within Minimap and saves it
local x, y = GetCursorPosition();
x = x / Minimap:GetEffectiveScale();
y = y / Minimap:GetEffectiveScale();

local cx, cy = Minimap:GetCenter();
ICU_PING_X = x + CURSOR_OFFSET_X - cx;
ICU_PING_Y = y + CURSOR_OFFSET_Y - cy;

-- Clear all display
ICU_Clear_Popup();
ICU_DebugEcho( "ICU_Minimap_OnClick_Event(): ICU_Clear_Popup()" ); --Fedos

-- Grab the tooltip and send it to be processed
ICU_Process_Tooltip( GameTooltipTextLeft1:GetText() );

-- Play a clicky sound
PlaySound( "UChatScrollButton" );

end


There is another section that deals with the process of "clicking" the mini mapfor my drop down box...

--Get Target Info
targetData = ICU_GetEnemyPlayer( target );
if targetData == nil then
targetData = ICU_GetFriendlyPlayer( target );
if targetData == nil then
targetData = ICU_GetEnemyMob( target );
if targetData == nil then
targetData = ICU_GetFriendlyMob( target );
if targetData == nil then
ICU_DebugEcho( "No data for " .. target );
targetData = ICU_GetEmptyTargetEntry();
end
else
isenemy = true;
isplayer = false;
ICU_DebugEcho( "Enemy:TRUE -- Player:FALSE" );
end
else
isenemy = false;
isplayer = true;
ICU_DebugEcho( "Enemy:FALSE -- Player:TRUE" );
end
else
isenemy = true;
isplayer = true;
ICU_DebugEcho( "Enemy:TRUE -- Player:TRUE" );
end

--okk...
if( targetData ~= nil ) then
-- The target's position on popup menu
pos = pos + 1;
health = 100;
-- Get the button position and display the result_line
local button = getglobal("ICU_PopupButton"..pos..isSecure.."Button"); --Fedos
local bar = getglobal("ICU_PopupButton"..pos..isSecure.."ButtonBar");
local bg = getglobal("ICU_PopupButton"..pos..isSecure.."ButtonBGBar");
local bgtext = getglobal("ICU_PopupButton"..pos..isSecure.."ButtonBarLeftText");
local classicon = getglobal("ICU_PopupButton"..pos..isSecure.."ButtonClassIcon"); --Fedos

local message = target;
local hsdata = target;

r = 255;
g = 0;
b = 0;

button:SetAttribute("target", target );

--known target : ive it in my db
if tonumber(targetData.Level) > 0 then

if( ICU_CLASSES[ targetData.Class ] ) then
classicon:SetTexCoord(unpack(ICU_CLASSES[ targetData.Class ]));
else
classicon:SetTexCoord(0, .25, 0, .25);
end
classicon:SetTexture("Interface\\Glues\\CharacterCreate\\UI-CharacterCreate-Classes");

if isplayer then
race = targetData.Race;
if( race == nil ) then
message = message .. " (" .. targetData.Level .. " " .. targetData.Class .. ")";
else
message = message .. " (" .. targetData.Level .. " " .. targetData.Race .. " " .. targetData.Class .. ")";
end
if isenemy then
r = ICUvars.EnemyPlayer.r;
g = ICUvars.EnemyPlayer.g;
b = ICUvars.EnemyPlayer.b;
else
r = ICUvars.FriendlyPlayer.r;
g = ICUvars.FriendlyPlayer.g;
b = ICUvars.FriendlyPlayer.b;
end
--Pet?
--if(targetData.Class == "Pet") then
-- classicon:SetTexCoord(0, 1, 0, 1);
-- classicon:SetTexture("Interface\\AddOns\\ICU\\images\\pet_unit");
--end

Last edited by Hanabul : 08-04-07 at 05:48 AM.
  Reply With Quote
08-04-07, 01:29 PM   #2
Layrajha
A Frostmaul Preserver
 
Layrajha's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 275
Can you copy the exact error message and indicate which line it refers to in your code, please (not only the block, but also the exact line).
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » ICU has an error Cursor_offset_X' (a nil value)


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