What's new
  • Visit Rebornbuddy
  • Visit Resources
  • Visit API Documentation
  • Visit Downloads
  • Visit Portal
  • Visit Panda Profiles
  • Visit LLamamMagic

CraftItems() UseSkill() return code

totalschaden

Active Member
Joined
Feb 16, 2010
Messages
1,146
Reaction score
1
The return values of CraftItems and UseSkill() are not working properly when cast is canceled. If you Craft or Cast something, and cancel it by moving for example, both will return true.
Code:
if (CraftItems(tradePackID, 1))
{
    Log("Successfully crafted Tradepack.", Color.Green);
    tradepacksCrafted++;
}
else
    Log(GetLastError().ToString());

Example Code will return "Successfully crafted Tradepack." even though nothing was crafted, same with UseSkill().

For Crafting Tradepacks its not as bad as for UseSkill, as i could check if I have a tradepack on back.

I tryed to fix this using OnSkillCasting to detect cast, but it has the same false positiv report.
 
Last edited:
hehe yeah happens a lot to and is not a big deal as far as trade packs counter goes in plugin but could be bad in other instances etc. I think it does it on turn ins to though actually because i have seen those numbers be wrong as well
 
Hi, thanks for report, will try to fix this
 
Back
Top