Wikia

WoWWiki

API SetFriendNotes

Talk0
101,546pages on
this wiki
Revision as of 08:26, May 26, 2009 by Smoke signals (Talk | contribs)

(diff) ←Older revision | Latest revision (diff) | Newer revision → (diff)
WoW API < SetFriendNotes

Sets the note text for a friend.

SetFriendNotes(friendIndex, noteText)

Parameters Edit

Arguments Edit

friendIndex 
Integer - Index of friend in the friend list (Note that status changes can re-order the friend list, indexes are not guaranteed to remain stable across events) (Also note that index should not be greater than 50 [see Notes]).
noteText 
String - The text that the friends note will be set to, up to 48 characters.

Returns Edit

nil

Example Edit

This example is done in a macro but could be converted, it will loop through all the names in your list and delete the note if there was one.

/run for i=1,GetNumFriends(),1 do local name, level , class, loc, connected, status, note = GetFriendInfo(i); SetFriendNotes(i, ""); end

ResultEdit

Your <AFK> friend Bill (The level 99 Leprechaun) is in Neverland.

NotesEdit

Friend information isn't necessarily automatically kept up to date. You can use the ShowFriends function to request an update from the server.

Do not use indexes greater than 50 (the maximum number of friend list entries)!

Notes greater than 48 characters in length will be truncated to 48 characters.

In some AddOn constellations I got WoW crashing by typing "/script GetFriendInfo(51)" (especially if FlagRSP was activated).

This crash leads to ERROR #132 (memory could not be "read").

Please use GetNumFriends() to iterate over all indexes securely.

References Edit

Around Wikia's network

Random Wiki