SRL Archive - SRL Bugs

FindNPCChatTextMulti


repahu

2012-03-31 21:15:49

Hi!
The FindNPCChatTextMulti function always returns true even if it has to be false. In text.simba i found the cause, "result:= false" line is missing from the beginning.
EDIT: Please move this thread to BUGS, thanks!

Coh3n

2012-04-02 02:56:38

From: repahu
Hi!
The FindNPCChatTextMulti function always returns true even if it has to be false. In text.simba i found the cause, "result:= false" line is missing from the beginning.
EDIT: Please move this thread to BUGS, thanks!
It isn't required. The result is set to false by default. It will only return true if the text is found.

repahu

2012-04-02 11:09:54

I thought that too, but somehow the function didn't work properly until i added that line in "text.simba".
Here is the code piece i used:

v:= ['its',Clickleft];
if WaitFuncEx('FindNPCChatText',v,400,5000) then WriteLn('true');

where v is a TVariantArray
After 1 loop the WaitFuncEx returned true while the NPCtext wasn't exist and no click was done.

Coh3n

2012-04-02 14:23:05

Are you sure it was after only one loop? Have you tested the function separately from WaitFuncEx (shouldn't matter, but you never know)?