3

» WarCraft 3 / Fudo

точки оружия вложения не годится! пожалуйста, это исправить! ваши изменения оружие меч это хорошо, но он делает шар огня, держава молнии и больше круг вокруг ничего. Посмотрите на эту картину.
3

» WarCraft 3 / cJass - дополнение к языку JASS

DotaMaster666:
cJass display syntax error because it process textmacros like #define instruction - you cannot use in textmacros or defines unclossed library or scope (and also closed, but unopened, in cJass you may use private define, so it must process scope and library before define and textmacro).
Try it:
//! textmacro itemstacking takes itemA, itemB, type
scope stack$type$ initializer I
// ...
Or it:
scope stacka initializer I
//! runtextmacro itemstacking("'desc'","'I007'")
endscope // remove endscope instruction in textmacro
How it look in cJass style:
#define itemstacking (itemA, itemB, id) = {
    scope stack##id initializer Init {
        private boolean f () {
            unit mu = GetManipulatingUnit()
            integer inve = 0 // GetInventoryHero(mu, itemB)
            item itm = null
            if inve != 6 {
                itm = null //GetItemHero(mu, itemB)
                SetItemCharges(itm, GetItemCharges(itm)+1)
            } else {
                UnitAddItemById(mu, itemB)
            }
            mu = null
            return false
        }
        
        private nothing Init () {
            // GT_AddItemAcquiredAction(function f, itemA)
        }
    }
}

itemstacking ('desc', 'I007', a)
itemstacking ('desc', 'I007', b)
It compiled as
function stacka___f takes nothing returns boolean
local unit mu=GetManipulatingUnit()
local integer inve=0
local item itm=null
if inve!=6 then
set itm=null
call SetItemCharges(itm,GetItemCharges(itm)+1)
else
call UnitAddItemById(mu,0x49303037)
endif
set mu=null
return false
endfunction
function stacka___Init takes nothing returns nothing
endfunction
function stackb___f takes nothing returns boolean
local unit mu=GetManipulatingUnit()
local integer inve=0
local item itm=null
if inve!=6 then
set itm=null
call SetItemCharges(itm,GetItemCharges(itm)+1)
else
call UnitAddItemById(mu,0x49303037)
endif
set mu=null
return false
endfunction
function stackb___Init takes nothing returns nothing
endfunction
i tried the second thing already. i didn't think to try the first thing. the third thing looks interesting...but why did you comment out the important function calls?
EDIT: ok see now i seem to have fixed the problem by doing as your first suggestion...
but i'm still having problems with cjass.
i enabled adicparser and jasshelper, and i go all the way through cjass without errors, but get into vjass compiling and get an error about unexpected elseif where there is no elseif. it's just else.
then when i disable jasshelper and try to run the file after successful compilation, the map will not be tested. so i'm not sure what the problem is.
ok, i checked the error again and the if isn't there either. and there never was elseif. it's just else. what is there is a static if when i checked the code in the trigger editor.
the line with the static if is gone in the error message.
i don't mind taking out static if should it be necessary, but is there a way to still use them? cjass seems to delete a line that has static if at the beginning, so now vjass cannot use that line.
edit: static if is so stupid anyway. i replaced static if where i can find them with a simple comment like this
if not what we're using then do commands that use something else
it actually takes less space and no need to get spelling of library or whatever correct.
3

» WarCraft 3 / cJass - дополнение к языку JASS

Я бегу в какой-то вопросы ... cjass компилятор дает мне ошибку на vjass код, который компилируется нормально с vjass компилятора. Я был очень взволнован, чтобы видеть некоторые изменения в cjass но vjass просто не работает на всех теперь. Мне пришлось удалить все мои cjass и снимите cjass компиляции опцию.
Вот пример. textmacro не работает один бит.
Мне сказали, что где-то textmacro являются архаичными и модуль превосходят ... Может быть, я должна использовать модуль? являются модули, используемые в cjass? все ... Вот некоторые примеры кода.
i'm running into some sort of issues...the cjass compiler is giving me errors on vjass code that compiles just fine with the vjass compiler. i was pretty excited to see some of the changes in cjass but vjass just isn't working at all now. i had to remove all my cjass and unclick cjass compiling option.
here's an example. textmacro doesn't work one bit.
i've been told somewhere that textmacro are archaic and that module are superior...maybe i should be using module? are modules used in cjass? whatever...here's some sample code.
in a library:
//! textmacro itemstacking takes itemA, itemB
private function f takes nothing returns boolean
  local unit mu = GetManipulatingUnit()
  local integer invi = GetInventoryHero(mu, $itemB$)
  local item itm = null
  if invi !=6 then
    set itm=GetItemHero(mu,$itemB$)
    call SetItemCharges(itm,GetItemCharges(itm)+1)
    set mu=null
    return false 
  else
    call UnitAddItemById(mu,$itemB$)
    set mu=null
    return false
  endif
endfunction

private function I takes nothing returns nothing
  call GT_AddItemAcquiredAction(function f, $itemA$)
endfunction

endscope
//! endtextmacro
in a trigger with various scopes:
scope stacka initializer I
//! runtextmacro itemstacking("'desc'","'I007'")
scope stackb initializer I
//! runtextmacro itemstacking("'fgsk'","'I008'")
scope stackc initializer I
//! runtextmacro itemstacking("'fgfh'","'I009'")
scope stackd initializer I
//! runtextmacro itemstacking("'pclr'","'I005'")
scope stacke initializer I
//! runtextmacro itemstacking("'pman'","'I006'")
scope stackf initializer I
//! runtextmacro itemstacking("'tgxp'","'I002'")
он скажет мне без конца сфера / library...if я передача от textmacro она будет сказать "нет" инициализатор, и т.д. .. он просто не работает ...
it will tell me no end of scope/library...if i transfer from the textmacro it'll say no initializer, etc...it just doesn't work...
если кто-нибудь может дать мне хороший пример использования определить макрос в cjass, может быть, я мог бы переделать все textmacro мой cjass для составления ... или не быть лучший способ решить эту проблему? есть ли способ я могу сделать cjass только компиляции определенные триггеры, которые cjass триггеров? Таким образом это не мешает смотреть на vjass код и дал мне ошибки так что я могу практики кодирования cjass?
if anyone could give me a good example of using define macro in cjass, maybe i could remake all my textmacro for cjass compiling...or shouldn't there be a better way around this? is there a way i can make cjass only compile certain triggers which are cjass triggers? that way it doesn't keep looking at vjass code and giving me errors so that i can practice coding cjass?
3

» WarCraft 3 / cJass - дополнение к языку JASS

XimikS:
you do not understand. i have checked every entry there. they are all my changed values. none of them look anything like it. see my pictures.
nothing is bold, italic, or underlined. and the /* */ comments are not an option in there.
i think they might be called delimeted comments.
i tried making an entry for them in the .ini file, but it doesn't do anything.
3

» WarCraft 3 / cJass - дополнение к языку JASS

как я могу изменить TESH варианты, которые приходят с сJASS?
Когда я попытался просмотреть комментарии, они по умолчанию курсивом, а зеленые и уродливые шрифта.
пример:
комментарий хорошо. это синий, а не по умолчанию.
/*комментарий по умолчанию. это не хорошо.*/
If that was not understood, try English:
How do I change the TESH options that come with cJASS?
When I tried to view the comments, they are default italics and green and ugly font.
Example:
comment is good. it is blue, not default.
/*comment is default. it is not good.*/