![]() |
|
|
#1 |
|
Архивный участник
Join Date: Oct 2005
Posts: 175
|
Hello,
i have a little problem compiling a part of a code: Code:
class MyClass : ParentClass
{
parameter:
float MyVar = 50;
handler:
EventHandler SPELLED(speller, skill_name_id)
{
if ((myself.sm.level / speller.level) < 1) {
MyVar = MyVar * (myself.sm.level / speller.level);
}
}
}
Code:
MyVar = MyVar * (myself.sm.level / speller.level);
|
|
|
|
|
#2 |
|
Архивный участник
Join Date: Jun 2005
Posts: 285
|
you can't change parameters, use built-in variables instead
|
|
|
|
|
#3 |
|
Архивный участник
Join Date: Mar 2005
Posts: 280
|
handler:
EventHandler SPELLED(speller, skill_name_id,c1) { if ((myself.sm.level / speller.level) < 1) { c1 = c1 * (myself.sm.level / speller.level); } } } |
|
|
|
|
#4 |
|
Архивный участник
Join Date: Oct 2005
Posts: 175
|
tx for your answer
|
|
|
|
|
#5 |
|
Архивный участник
Join Date: Jun 2005
Posts: 285
|
actually cX are CreatureData variables, you should use fX variables in this example
|
|
|
|
|
#6 |
|
Архивный участник
Join Date: Oct 2005
Posts: 175
|
yes you are right, i used i0 and it works great now, tx a lot fo your advices
|
|
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|