jass - Форум


Правила форума ·

  • Страница 1 из 2
  • 1
  • 2
  • »
Форум » Сайт » Общение » jass
jass

SirNikolas

#1
[jass]function abc takes nothing returns nothing
local unit u = GetTriggerUnit()
local integer i = 0
loop
call KillUnit(u)
exitwhen i == 10
set i = i + 1
endloop
set u = null
endfunction[/jass]

Добавлено (28.12.11, 14:21)
---------------------------------------------
Базу нативок и BJ еще надо.

Добавлено (28.12.11, 14:23)
---------------------------------------------
[jass]library struct method interface module private public debug static for while
include define enum do lambda[/jass]

Добавлено (28.12.11, 14:29)
---------------------------------------------

Добавлено (28.12.11, 14:30)
---------------------------------------------
ZINC и cJASS в игноре?

Добавлено (28.12.11, 14:38)
---------------------------------------------
[jass]void bool int float array[/jass]

Добавлено (28.12.11, 14:55)
---------------------------------------------
[jass]local integer i = 123
local real r = 1.23
set i = 0123
set i = 0x123
set i = $123
set r = .123
set r = 123.[/jass]

"I will make this the first approved cJass-only resource here on the Hive" - Bribe about ALL.

SirNikolas

#3
[jass]true false this null DEBUG FUNCNAME COUNTER
code handle agent widget eventid[/jass]

Добавлено (28.12.11, 15:02)
---------------------------------------------

Quote (CoRVu$)
тест текста. чё будет?
Code
Syntax error (line 1): Illegal char 'т'

Добавлено (28.12.11, 15:03)
---------------------------------------------
[jass]bj_mapInitialPlayableArea[/jass]

Добавлено (28.12.11, 15:05)
---------------------------------------------

Quote (SirNikolas)
DEBUG
Это не ключевое слово, а константа.

Добавлено (28.12.11, 15:07)
---------------------------------------------
[jass]local integer id = 'A000'
local integer id2 = 'x'[/jass]

Добавлено (28.12.11, 15:08)
---------------------------------------------
[jass]INTEGER REAL BOOLEAN FUNCTION[/jass]

Добавлено (28.12.11, 15:09)
---------------------------------------------
^ Нечувствителен к регистру.

Добавлено (28.12.11, 15:39)
---------------------------------------------
[jass]local unit u = GetTriggerUnit()[/jass]

Добавлено (28.12.11, 15:40)
---------------------------------------------
^ Внутри тега работают BB-коды.

"I will make this the first approved cJass-only resource here on the Hive" - Bribe about ALL.

SirNikolas

#6
[jass]function DoNothingBJ takes nothing returns nothing
call CommentString("Проверка подсветки BJ и строк")
//А также комментариев
call DoNothing()
endfunction[/jass]

Добавлено (29.12.11, 09:43)
---------------------------------------------
[jass]#if WAR3VER == WAR3VER_23
#error "Wrong version"
#elseif WAR3VER == WAR3VER_24
//Все нормально
#endif[/jass]

Добавлено (29.12.11, 09:47)
---------------------------------------------
[jass]/*
* MyLibrary vX.XX
*
* Description of my library.
*
* © Year Author \\ Ternox.com
*
*/[/jass]

Добавлено (29.12.11, 09:51)
---------------------------------------------
[jass]call IssueImmediateOrderById(GetTriggerUnit(), 851972 /*stop*/)[/jass]

Добавлено (29.12.11, 11:21)
---------------------------------------------
[jass]function TestSpaces takes nothing returns nothing
if true then
call DoNothing()
endif
loop
call DoNothing()
exitwhen true
endloop
endfunction[/jass]

Добавлено (29.12.11, 11:24)
---------------------------------------------
[jass]FALSE TRUE JASS_MAX_ARRAY_SIZE bj_MISSION_INDEX_T01 bj_lastCreatedUnit bj_mapInitialPlayableArea[/jass]

Добавлено (29.12.11, 11:59)
---------------------------------------------
[jass]void MyFunc(void) {
unit u = GetTriggerUnit(), \
u2 = GetSpellTargetUnit()
if true { DoNothing() }
KillUnit(u); KillUnit(u2)
u = null; u2 = null
}[/jass]

Добавлено (29.12.11, 12:53)
---------------------------------------------
[jass]key thistype[/jass]

Добавлено (29.12.11, 12:55)
---------------------------------------------
[jass]thistype.abc = 0
this.def = 1
abc.thistype
def.this[/jass]

Добавлено (29.12.11, 12:56)
---------------------------------------------
[jass]define GetHandleIdBJ(h) = GetHandle##IdBJ(h)[/jass]

Добавлено (29.12.11, 13:13)
---------------------------------------------
[jass]struct MyStruct extends array
private static method onInit takes nothing returns nothing
call DoNothing()
endmethod
endstruct[/jass]

Добавлено (29.12.11, 13:19)
---------------------------------------------
[jass]//! zinc
library Test {
function onInit() {
boolean b = true;
integer i;
for (0 <= i < 16)
BJDebugMsg(I2S(i));
if (b && true || false)
DoNothing();
}
}
//! endzinc[/jass]

Добавлено (29.12.11, 13:50)
---------------------------------------------
[jass] native GetPlayerUnitTypeCount takes player p, integer unitid returns integer
native GetUnitGoldCost takes integer unitid returns integer
native GetUnitWoodCost takes integer unitid returns integer
native GetUnitBuildTime takes integer unitid returns integer
native IsTowered takes unit target returns boolean
native CreepsOnMap takes nothing returns boolean
native UnitAlive takes unit id returns boolean[/jass]

Добавлено (29.12.11, 14:14)
---------------------------------------------
[jass]function test takes nothing returns nothing
call DoNothing()
endfunction[/jass]

Добавлено (29.12.11, 14:16)
---------------------------------------------
[jass]function test2 takes nothing returns nothing
call DoNothing()
endfunction[/jass]

Добавлено (29.12.11, 14:17)
---------------------------------------------
[jass]function test2 takes nothing returns nothing
call DoNothing()
endfunction[/jass]

"I will make this the first approved cJass-only resource here on the Hive" - Bribe about ALL.

Ty3uK

#7
[jass]function KnockbackUnit takes unit knockbacked, real distance, real time, real degrees, real period returns nothing
local timer t = CreateTimer()
local integer hid = GetHandleId(t)
local integer amount = R2I(time / period)
local real portion = distance / amount
call SaveAgentHandle(udg_Hashtable, hid, 0, knockbacked)
call SaveInteger(udg_Hashtable, hid, 1, amount)
call SaveReal(udg_Hashtable, hid, 2, portion)
call SaveInteger(udg_Hashtable, hid, 3, 0)
call SaveReal(udg_Hashtable, hid, 4, degrees)
call TimerStart(t, period, true, function KnockbackUnit_Timer)
set t = null
endfunction[/jass]

Новая подсветка. Пробелы заменяются на " ", но будьте внимательны при правке - "умный" Укоз их стирает -_-
Сообщение отредактировал Ty3uK - Чт, 29.12.11, 20:59
Аниме - такая вещь, которая балансирует на грани "надоевшего" и "нового" из-за Наруто в основном. © [DUOS]
GUI Must Die v1.1 | Arena Multiboard

Spirit_of_Dragon

#8
[jass]//! zinc
struct MyStruct
unit u
private static method onDestroy takes nothing returns nothing
set u = null
endmethod
endstruct
[/jass]
должен подсвечиваться серым
запилите в предпросмотр
а так ок, формат дико напомнил готовые Highlighter'ы
молодцы ребята, хотел помочь, да поздно было уже. Предложил пару плюшек условной трансляции и Ник запилил их

Добавлено (29.12.11, 23:17)
---------------------------------------------

Quote (Spirit_of_Dragon)
должен подсвечиваться серым

я про
[jass]//! zinc[/jass]
и числа подсветите в стиле типов

Добавлено (29.12.11, 23:19)
---------------------------------------------
и имена функций и методов непривычно подсвечиваются т_т

H_A_PK

#9
заменил в статьях code на jass
Ползут 2 пирожка.
Первый: Я тебя щас трахну.
Второй: Почему?
Первый: Потому что я с яйцами :D

Ty3uK

#10
Драгон, я переписал прошлый скрипт на основе готового подтветчика, поэтому он и похож. Похожесть уберу smile над зинком ломаю голову- пока скрипт тащит его как коммент. Ну и офк тупой укоз, который не принимает пробелы и табуляцию в чистом виде. Пляшу с бубном
Аниме - такая вещь, которая балансирует на грани "надоевшего" и "нового" из-за Наруто в основном. © [DUOS]
GUI Must Die v1.1 | Arena Multiboard

SirNikolas

#11
Quote (Spirit_of_Dragon)
и имена функций и методов непривычно подсвечиваются т_т
Только onInit и onDestroy. Я подумал, удобнее будет.[jass]native GetPlayerUnitTypeCount takes player p, integer unitid returns integer
native GetUnitGoldCost takes integer unitid returns integer
native GetUnitWoodCost takes integer unitid returns integer
native GetUnitBuildTime takes integer unitid returns integer
native IsTowered takes unit target returns boolean
native CreepsOnMap takes nothing returns boolean
native UnitAlive takes unit id returns boolean[/jass]Ty3uK, добавь уже эти нативки. smile
"I will make this the first approved cJass-only resource here on the Hive" - Bribe about ALL.

SirNikolas

#13
Кстати, надо сделать, чтоб так же подсвечивались create, destroy, allocate и deallocate.
"I will make this the first approved cJass-only resource here on the Hive" - Bribe about ALL.
Форум » Сайт » Общение » jass
  • Страница 1 из 2
  • 1
  • 2
  • »
Поиск: