View Single Post
04-20-15, 01:09 AM   #12
Etul
A Murloc Raider
Join Date: Apr 2015
Posts: 4
Oh wow... I wasn't expecting this thread to explode overnight, though I do appreciate all of you adding your input. I almost don't know where to start.

Originally Posted by odjur84 View Post
Hi!

I already gave you a hint how to print in one line. :-)

Code:
DEFAULT_CHAT_FRAME:AddMessage("Charactername: " .. NpcData.characterName .. " " .. "Characterrealm: " .. NpcData.characterRealm)
This concatenates the two strings, separated by a blank and some additional information.

Cheers,

Odjur
Whoops, my bad... so much information is flying everywhere I totally missed it. >.< Thanks!

Originally Posted by myrroddin View Post
That is a horrible global name for a variable. Add the word local in front.
Originally Posted by Rilgamon View Post
Not only that ... its misleading, too. NPC means Non-Player-Character ... storing Player-Data in this var is confusing
My intention was for the "NPCData" variable to store data from multiple toons as I specified it in the "SavedVariable" section of my .toc file. If I declare it as a local variable will it still work across multiple toons?

I realised that I probably need to reverse the process and scan for the appropriate NPCs before recording any data so I will probably end up making arrays within something like NPCData[harrison] to store the player info. I don't know if it will make things less confusing then.
  Reply With Quote