View Single Post
11-10-14, 06:45 AM   #3
blackytemp
A Murloc Raider
Join Date: Feb 2012
Posts: 4
Thank you! That explains the weird output. However, I am still having serious issues with the string matching. Even running

Code:
/run local _,w = BNGetFriendInviteInfo(1); print(w); print(string.match(w,"GM"));
Results in:

Code:
|Kb5|kGM6767|k
nil
Even though the output of the variable shows that GM is clearly even in the escaped string. Again using the dots as a catchall (one short of the total string length so I can actually see it in ingame chat) reveals it is somehow using 0's instead when under the string operation (tested with both match and find):

Code:
/run local _,w = BNGetFriendInviteInfo(1); print(w); print(string.match(w,"............."));
Results in:

Code:
|Kb5|kGM6767|k
|Kb5|k000000|
However, if I extend the . wildcards by one for the full length, it suddenly gives back the correct escaped string again. I'm having serious troubles wrapping my head around this, I assume I'm misunderstanding something about the string operations maybe?
  Reply With Quote