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

Custom Behavior Problems

axazol

New Member
Joined
Jun 27, 2010
Messages
308
Reaction score
8
First of all:
I'v spoted problem in "UseItemOn". Unable to parse string as float
87-104 lines of code
Code:
float x, y, z;
            if (!float.TryParse(Args["X"], out x))
            {
                Logging.Write("Parsing attribute 'X' in UseItemOn behavior failed! please check your profile!");
                error = true;
            }

            if (!float.TryParse(Args["Y"], out y))
            {
                Logging.Write("Parsing attribute 'Y' in UseItemOn behavior failed! please check your profile!");
                error = true;
            }

            if (!float.TryParse(Args["Z"], out z))
            {
                Logging.Write("Parsing attribute 'Z' in UseItemOn behavior failed! please check your profile!");
                error = true;
            }
should be
Code:
float x, y, z;
            if (!float.TryParse((string)Args["X"], out x))
            {
                Logging.Write("Parsing attribute 'X' in UseItemOn behavior failed! please check your profile!");
                error = true;
            }

            if (!float.TryParse((string)Args["Y"], out y))
            {
                Logging.Write("Parsing attribute 'Y' in UseItemOn behavior failed! please check your profile!");
                error = true;
            }

            if (!float.TryParse((string)Args["Z"], out z))
            {
                Logging.Write("Parsing attribute 'Z' in UseItemOn behavior failed! please check your profile!");
                error = true;
            }
And wuld be great if you accept one standart to all "Location" attributes. Coz in some behavior it writed as "xx.xx yy.yy zz.zz", in other x="" y="" z="".
 
Last edited:
Back
Top