XGM Forum
Сайт - Статьи - Проекты - Ресурсы - Блоги

Форуме в режиме ТОЛЬКО ЧТЕНИЕ. Вы можете задать вопросы в Q/A на сайте, либо создать свой проект или ресурс.
Вернуться   XGM Forum > Warcraft> Академия: форум для вопросов> Jass
Ник
Пароль
Войти через VK в один клик
Сайт использует только имя.

Ответ
 
RSQR

offline
Опыт: 29,316
Активность:
Ошибка в Jass-карте.
Привет всем читающим! Собсно нашёл хорошую наработку, но при пересохранении вылезает такая ошибка: screenshot.su/show.php?img=d98754417b6a85ebfb6987d7ed80dcf2.jpg
Обращаюсь сюда так как автор в отключке уже год, а в жассе, стыдно даже говорить, не разбираюсь.
Вот карта
Старый 16.09.2011, 18:32
Doc

offline
Опыт: 63,163
Активность:
В missilegroup замени scope на library, а endscope на endlibrary,
Старый 16.09.2011, 21:04
RSQR

offline
Опыт: 29,316
Активность:
Doc, так-то оно так, но:
library MissileGroup requires Table

    private function interface forMissileDo takes CustomMissile theMissile returns nothing
    private function interface onMissileEnum takes CustomMissile theMissile returns nothing

    struct MissileGroup
        private Table   stack = 0
        private Table   stackIndex = 0
        private integer index = 0
        
        public onMissileEnum onEnum = 0
        
        public static method create takes nothing returns thistype
            local thistype this = thistype.allocate()
            
            set .stack = Table.create()
            set .stackIndex = Table.create()
            
            return this
        endmethod
        
        method operator [] takes integer index returns CustomMissile
            return .stack[index]
        endmethod
        
        public method amount takes nothing returns integer
            return .index
        endmethod
        
        public method add takes CustomMissile theMissile returns nothing
            if .stackIndex.exists(theMissile.ID) then
                return
            endif
            
            set .stack[.index] = integer(theMissile)
            set .stackIndex[theMissile.ID] = .index
            set .index = .index +1
            call .onEnum.execute(theMissile)
        endmethod
        
        public method run takes forMissileDo theFunc returns nothing
            local integer i = 0
            
            loop
                exitwhen i >= .index
                
                call theFunc.execute(CustomMissile(.stack[i]))
                set i = i +1
            endloop
        endmethod
        
        public method remove takes CustomMissile theMissile returns nothing
            local integer i = 0
            
            if .stackIndex.exists(theMissile.ID) then
                set i = .stackIndex[theMissile.ID]
                call .stackIndex.flush(theMissile.ID)
                
                set .stack[i]                       = .stack[.index -1]
                set .stackIndex[CustomMissile(.stack[i]).ID] = i
                set .index                          = .index -1
            endif
        endmethod
        
        public method clear takes nothing returns nothing
            local integer i = 0
            
            loop
                exitwhen i >= .index
                
                call .stackIndex.flush(CustomMissile(.stack[i]).ID)
                call .stack.flush(i)
                set i = i +1
            endloop
            
            set .index = 0
        endmethod
        
        public method inGroup takes CustomMissile theMissile returns boolean
            return .stackIndex.exists(theMissile.ID)
        endmethod
        
        private method onDestroy takes nothing returns nothing
            call .clear()
        endmethod
    endstruct
endlibrary
где ты тут скоуп видишь? Я лично нет.
Старый 16.09.2011, 21:08
Master_chan
Полуночный командир
offline
Опыт: 15,660
Активность:
requires Table
рукалицо, он про это.
Старый 16.09.2011, 21:27
Doc

offline
Опыт: 63,163
Активность:
Ах да, у меня все сохранилось. Jh - 0.A.2.B
Старый 16.09.2011, 21:36
Faion
Noblesse Oblige
offline
Опыт: 30,395
Активность:
Ясно же написано, требует доп. либы подключить.
Старый 16.09.2011, 22:21
RSQR

offline
Опыт: 29,316
Активность:
Doc, тоже самое.
Faion, =\ вы определитесь чтоль.
Старый 16.09.2011, 22:27
Faion
Noblesse Oblige
offline
Опыт: 30,395
Активность:
Я не качал, но CustomEffect,Loc,GroupUtils != scope?
Старый 16.09.2011, 22:34
Master_chan
Полуночный командир
offline
Опыт: 15,660
Активность:
scope Table > library Table
Всё же ясно написано в самой ошибке.
Старый 17.09.2011, 04:09
RSQR

offline
Опыт: 29,316
Активность:
Master_chan, переведи на русский пожалуйста =)
Doc, изволь залить свой жнгп на файлообменник и дать ссылку, пожалуйста)
Старый 17.09.2011, 15:16
Doc

offline
Опыт: 63,163
Активность:
Скачай последний jh с wc3c.net да и все.
Старый 17.09.2011, 22:11
RSQR

offline
Опыт: 29,316
Активность:
Doc, качал оттуды. Всё равно та-ж проблема. Настроил как надо.
Старый 18.09.2011, 11:29
Ответ

Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск

Ваши права в разделе
Вы не можете создавать темы
Вы не можете отвечать на сообщения
Вы не можете прикреплять файлы
Вы можете скачивать файлы

BB-коды Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход



Часовой пояс GMT +3, время: 05:23.