Thread Tools Display Modes
10-22-05, 08:14 AM   #1
sweede
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Oct 2005
Posts: 18
Sending an Item link in a /command crashes wow

I have, in my OnLoad() methid,
Code:
	SLASH_BID1 = "/bid";
		SlashCmdList["BID"] = function( msg )
			DKP_Bid_Auction_SlashCommandHandler( msg );
		end
later on,
Code:
msg = string.lower(msg);
	msgArgs = GetArgs(msg, " ");
	
	-- Get the number of arguments
	numArgs = table.getn(msgArgs);
				
... bunch of useless stuff ...

elseif (numArgs >= 3) then
		if (msgArgs[1] == "begin") then
			AuctionEnabled = true;
			DEFAULT_CHAT_FRAME:AddMessage("DKP_Bid: Auction started.");
			AuctionList = {};
			Display_Bidders("GUI");		
			AuctionToggleButton:SetText("End Auction");

			SendChatMessage("Send tell to "..UnitName('player').." with keyword `bid' to bid on ".. msgArgs[2] .. " @ " .. msgArgs[3] .."pts","GUILD")
	
		else
Which as you can see, i want to do
/bid begin [uber item] 7 (which repepresents the dkp cost of the item)

However, when i do that, the game either crashes, or only
Send tell to player with keyword `bid' to bid on
is shown. If i dont put an item link, but plain text (i.e. /bid begin foo 7), it displays the whole thing properly.


Any ideas on what im doing wrong ? I'm begining to point the blame at the strng.lower() and GetArgs() methods, but when i modify the code to completly bypass them, it still doesnt fix the problems.

thanks
  Reply With Quote
10-22-05, 10:13 AM   #2
guice
A Cobalt Mageweaver
Join Date: Jan 2005
Posts: 236
Part of the WoW client code that only lets you link items that has been seen (I think by you?) since last server up.

Are you directly linking the item from a loot box? Or are you relying on a link archiver for the link?
  Reply With Quote
10-22-05, 11:38 AM   #3
sweede
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Oct 2005
Posts: 18
I think i figured it out.

if i linked an item like [Joe] it would work, but [Joes Crab Shack] wouldnt work. the GetArgs function would split by space chacter, and break the item link text.

i just did a silly workaround by adding a seperate slashcommand in teh event i needed to enter an item link in.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Sending an Item link in a /command crashes wow


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