Error Hooks.OnResearch

Komrad

Member
Member
May 14, 2017
89
4
6
30
Because you must make a return; ...... "I explain it to you above xd :D"

C#:
if (re.ItemName == "Paper")
            {
                re.Player.Message("You cant craft Paper - Prohibited object for a while!!");
                re.Cancel();
                //TRY ADD RETURN
                return;
            }
I added the return already - there is still an inscription - the сraft is successfully studied and the Research Kit 1 - the method with the issuance of the new one is not suitable because the Research Kit 1 can be charged from 1 to 3 uses - well, or it could be a Recycle Kit 1
 

Jakkee

Retired Staff
Retired Staff
Plugin Developer
Jul 28, 2014
1,465
932
113
Australia
What is your Fougerite version? re.Cancel()might not be working on your version
 

Komrad

Member
Member
May 14, 2017
89
4
6
30
I do not understand something - I've already said that a bug in the hook: He does not miss the study, but the SMS is climbing + takes the set to study
 
  • Informative
Reactions: DreTaX and Jakkee

Komrad

Member
Member
May 14, 2017
89
4
6
30
Gonna look into It, but have no idea sorta what you are saying?
I want to say that if you use this code

C#:
private void Hooks_OnResearch(Fougerite.Events.ResearchEvent re)
        {
            re.Cancel();
        }
The subject wakes studied, but the player wakes notified that the subject studied and inventory of wakes removed Research Kit 1