Please help me
I want to make the game interesting, so I got a script, when identification skills more than 100, when identification equipment can find additional properties, but I encountered a problem.my this script, why when my skills more than 20, the use has been a failure, less than 20 can be successfully identified
:(:(:(:(
 

Attachments

  • ItemIdentification.cs
    38 KB · Views: 6
If you use 'If', You need to Sort Descending.
I Think this part is one of the errors in your script.

For example
Don't make script like this
if ( aaa > 10 ) {
function1();
}
else if ( aaa > 20 ) {
function2();
}
else if ( aaa > 30 ) {
function3();
}

if you make a script like this, your script will do function1 when you input number more than 10.
It means when you input 25, It will use only function1.

So, you need to change function like this.

if ( aaa > 30 ) {
function3();
}
else if ( aaa > 20 ) {
function2();
}
else if ( aaa > 10 ) {
function1();
}

or

if ( aaa > 10 ) {
if ( aaa > 20 ) {
if ( aaa > 30 ) {
function3();
}
function2();
}
function1();
}
 
Back