![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 32 Pomógł: 0 Dołączył: 13.07.2009 Skąd: Ziemia Ostrzeżenie: (0%) ![]() ![]() |
Witam. Mak taki oto kod:
Kod function CharacterRenderer(target, graphics) { /*...*/ this.buffs = new Array(9); this.buffctxs = new Array(9); for (var i = 0; i < 9; i++) { this.buffs[i] = document.createElement(this.canvas.id + "buff" + i); this.buffctxs[i] = this.buffs[i].getContext('2d'); } } Podczas wykonywania wywala mi taki błąd: Cytat this.buffs[i].getContext is not a function Co robię źle? |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Moderatorzy Postów: 8 989 Pomógł: 1550 Dołączył: 8.08.2008 Skąd: Słupsk/Gdańsk ![]() |
Kod document.createElement(this.canvas.id + "buff" + i) document.createElement tworzy element o podanej nazwie tagu. A "buff" nie występuje w slowie "canvas" |
|
|
![]() ![]() |
![]() |
Aktualny czas: 26.09.2025 - 12:24 |