![]() |
|
||||||||||
|
|||||
|
Регистрация: Jun 2005
Сообщений: 74
|
public function pl_addStat(stat:String, count:Number):Number {
this.stat -= count;
return this.stat;
}
public function pl_removeStat(stat, count):Number {
this.stat -= count;
return this.stat;
}
**Error** D:\My Art\game\player.as: Line 23: There is no property with the name 'stat'. this.stat -= count; **Error** D:\My Art\game\player.as: Line 24: There is no property with the name 'stat'. return this.stat; **Error** D:\My Art\game\player.as: Line 27: There is no property with the name 'stat'. this.stat -= count; **Error** D:\My Art\game\player.as: Line 28: There is no property with the name 'stat'. return this.stat; Total ActionScript Errors: 4 Reported Errors: 4 Мне нужен метод класса который принимал бы параметры: 1й. Имя переменной. 2й. Количество. Изменял переменную класса с именем записаным в параметре stat И возвращал бы её. Все просто вроде, но ругается, и это при создании объекта, функции эти я не вызываю. Последний раз редактировалось Nirth; 20.06.2005 в 23:04. |
![]() |
Часовой пояс GMT +4, время: 01:20. |
|
|
« Предыдущая тема | Следующая тема » |
|
|