Doc
offline
Опыт:
63,163Активность: |
Absol, ок. |
18.04.2012, 20:47 | #61
+0/−0
Профиль |
Приват |
Поиск |
Цитата |
IP: Записан
|
NIKZ
Изучаю Jass
offline
Опыт:
6,036Активность: |
а можно vJass конвертировать в Jass? [+] замечание от Msey: дублирование поста, идиотизм
|
18.04.2012, 22:29 | #62
+0/−0
Профиль |
Приват |
Поиск |
Цитата |
IP: Записан
|
Msey
????
offline
Опыт:
67,346Активность: |
NIKZ, редактор в конечном процессе код компилирует и так в обычный жас
Msey добавил:
ну наверное указать свой путь, не? |
19.04.2012, 00:53 | #63
+0/−0
Профиль |
Приват |
Поиск |
Цитата |
IP: Записан
|
NIKZ
Изучаю Jass
offline
Опыт:
6,036Активность: |
Ты хочешь сказать что в архиве карты будет обычный Джасс?? Значит ты ошибаешься там vJass |
19.04.2012, 20:33 | #64
+0/−2
Профиль |
Приват |
Поиск |
Цитата |
IP: Записан
|
DaeDR
offline
Опыт:
8,074Активность: |
NIKZ, Тот архив, который читает вар - чистый jass. V и С - только упрощение для работы картодела. В итоге все сводится к обычному. |
19.04.2012, 20:38 | #65
+0/−0
Профиль |
Приват |
Поиск |
Цитата |
IP: Записан
|
NIKZ
Изучаю Jass
offline
Опыт:
6,036Активность: |
Ну допустим это из архива
((код jass
globals
constant boolean LIBRARY_DebugLog=true integer DebugLog__CurrentString=0 integer DebugLog__Seconds=0 integer DebugLog__Minutes=0 constant integer DebugLog__StringLimit=200 trigger gg_trg_DebugLog=null trigger gg_trg_Add=null trigger gg_trg_Clear=null trigger gg_trg_Update=null trigger l__library_init string array sDebugLogDebugLog string array s2DebugLogDebugLog endglobals function sgDebugLogDebugLog_get takes integer i returns string if(i<8191)then return sDebugLogDebugLog[i] else return s2DebugLogDebugLog[i-8191] endif endfunction function sgDebugLogDebugLog_set takes integer i,string v returns nothing if(i<8191)then set sDebugLogDebugLog[i]=v else set s2DebugLogDebugLog[i-8191]=v endif endfunction function LogAdd takes string s returns nothing local string sec=I2S(DebugLog__Seconds) if(DebugLog__Seconds<10)then set sec="0"+sec endif call sgDebugLogDebugLog_set(DebugLogCurrentString,sgDebugLogDebugLog_get(DebugLogCurrentStrin​g)+("["+I2S(DebugLog__Minutes)+":"sec"] "s"\n")) if(StringLength(sgDebugLogDebugLog_get(DebugLogCurrentString))>=DebugLogStringLimit)then set DebugLogCurrentString=DebugLogCurrentString+1 endif endfunction function LogClear takes nothing returns nothing local integer i=0 loop exitwhen not(i<=DebugLog__CurrentString) call sgDebugLogDebugLog_set(i,"") set i=i+1 endloop set DebugLog__CurrentString=0 endfunction function LogUpdate takes nothing returns nothing local integer i=0 call PreloadGenClear() call PreloadGenStart() loop exitwhen not(i<=DebugLog__CurrentString) call Preload("\")\n"+sgDebugLogDebugLog_get(i)+"\n(\"") set i=i+1 endloop call PreloadGenEnd("C:\\Dir\\Debug.txt") endfunction function DebugLog__DebugLogOnTimer takes nothing returns nothing set DebugLogSeconds=DebugLogSeconds+1 if(DebugLog__Seconds>59)then set DebugLog__Seconds=0 set DebugLogMinutes=DebugLogMinutes+1 endif endfunction function DebugLog__DebugLogInit takes nothing returns nothing call TimerStart(CreateTimer(),1.0,true,function LogUpdate) call TimerStart(CreateTimer(),1.,true,function DebugLog__DebugLogOnTimer) call LogAdd("By DoctorGester. Last compilation: 2011.04.25 19:03:15") endfunction function InitGlobals takes nothing returns nothing endfunction function Trig_Add_Actions takes nothing returns nothing call LogAdd("TEST") endfunction function InitTrig_Add takes nothing returns nothing set gg_trg_Add=CreateTrigger() call TriggerRegisterPlayerChatEvent(gg_trg_Add,Player(0),"add",true) call TriggerAddAction(gg_trg_Add,function Trig_Add_Actions) endfunction function Trig_Clear_Actions takes nothing returns nothing call LogClear() endfunction function InitTrig_Clear takes nothing returns nothing set gg_trg_Clear=CreateTrigger() call TriggerRegisterPlayerChatEvent(gg_trg_Clear,Player(0),"clear",true) call TriggerAddAction(gg_trg_Clear,function Trig_Clear_Actions) endfunction function Trig_Update_Actions takes nothing returns nothing call LogUpdate() endfunction function InitTrig_Update takes nothing returns nothing set gg_trg_Update=CreateTrigger() call TriggerRegisterPlayerChatEvent(gg_trg_Update,Player(0),"update",true) call TriggerAddAction(gg_trg_Update,function Trig_Update_Actions) endfunction function InitCustomTriggers takes nothing returns nothing call InitTrig_Add() call InitTrig_Clear() call InitTrig_Update() endfunction function RunInitializationTriggers takes nothing returns nothing call ConditionalTriggerExecute(gg_trg_DebugLog) endfunction function InitCustomPlayerSlots takes nothing returns nothing call SetPlayerStartLocation(Player(0),0) call SetPlayerColor(Player(0),ConvertPlayerColor(0)) call SetPlayerRacePreference(Player(0),RACE_PREF_HUMAN) call SetPlayerRaceSelectable(Player(0),true) call SetPlayerController(Player(0),MAP_CONTROL_USER) endfunction function InitCustomTeams takes nothing returns nothing call SetPlayerTeam(Player(0),0) endfunction function main takes nothing returns nothing call SetCameraBounds(-1280.0+GetCameraMargin(CAMERA_MARGIN_LEFT),-1536.0+GetCameraMargin(CAMERA_MARGIN_BO​TTOM),1280.0-GetCameraMargin(CAMERA_MARGIN_RIGHT),1024.0-GetCameraMargin(CAMERA_MARGIN_TOP),-1280.0+​GetCameraMargin(CAMERA_MARGIN_LEFT),1024.0-GetCameraMargin(CAMERA_MARGIN_TOP),1280.0-GetCameraMargin​(CAMERA_MARGIN_RIGHT),-1536.0+GetCameraMargin(CAMERA_MARGIN_BOTTOM)) call SetDayNightModels("Environment\\DNC\\DNCLordaeron\\DNCLordaeronTerrain\\DNCLordaeronTerrain.mdl​","Environment\\DNC\\DNCLordaeron\\DNCLordaeronUnit\\DNCLordaeronUnit.mdl") call NewSoundEnvironment("Default") call SetAmbientDaySound("LordaeronSummerDay") call SetAmbientNightSound("LordaeronSummerNight") call SetMapMusic("Music",true,0) call InitBlizzard() call ExecuteFunc("DebugLog__DebugLogInit") call InitGlobals() call InitCustomTriggers() call ConditionalTriggerExecute(gg_trg_DebugLog) endfunction function config takes nothing returns nothing call SetMapName("??? ???? ?????") call SetMapDescription("???????? ???????????") call SetPlayers(1) call SetTeams(1) call SetGamePlacement(MAP_PLACEMENT_USE_MAP_SETTINGS) call DefineStartLocation(0,-64.0,-192.0) call InitCustomPlayerSlots() call SetPlayerSlotAvailable(Player(0),MAP_CONTROL_USER) call InitGenericPlayerSlots() endfunction ))
NIKZ добавил: NIKZ, Это Jass? |
19.04.2012, 20:47 | #66
+0/−0
Профиль |
Приват |
Поиск |
Цитата |
IP: Записан
|
XOR
offline
Опыт:
38,159Активность: |
да |
19.04.2012, 20:54 | #67
+0/−0
Профиль |
Приват |
Поиск |
Цитата |
IP: Записан
|
NIKZ
Изучаю Jass
offline
Опыт:
6,036Активность: |
Как мне его распределить по триггерам?), так как он куучу ошибок вызывает |
19.04.2012, 20:55 | #68
+0/−0
Профиль |
Приват |
Поиск |
Цитата |
IP: Записан
|
Doc
offline
Опыт:
63,163Активность: |
ну допустим глобалс - фича обычного жасса, просто редактор ее не пускает. |
19.04.2012, 21:46 | #69
+0/−0
Профиль |
Приват |
Поиск |
Цитата |
IP: Записан
|
quq_CCCP
Я белый и пушистый!
offline
Опыт:
93,458Активность: |
NIKZ, функция main исполняется еще до загрузки карты, её нельзя трогать, там параметры карты, и их изменение во время игры не сулит нечего хорошего, так же ты показал ту часть кода карты которая генерируется редактором, и не должна изменятся тобой по определению... Тут если бы редактор не ругался, ругался бы движок в виде FATAL ERROR! |
20.04.2012, 06:25 | #70
+0/−0
Профиль |
Приват |
Поиск |
Цитата |
IP: Записан
|
NIKZ
Изучаю Jass
offline
Опыт:
6,036Активность: |
Установил JNGP поставил сJass и все равно не хочет. Он просто напростос не видит кода (не понимает код) |
06.05.2012, 15:01 | #71
+0/−0
Профиль |
Приват |
Поиск |
Цитата |
IP: Записан
|
quq_CCCP
Я белый и пушистый!
offline
Опыт:
93,458Активность: |
NIKZ, точно настроил все параметры как на скрине? Мб у тебя в коде ошибки.... |
06.05.2012, 15:37 | #72
+0/−0
Профиль |
Приват |
Поиск |
Цитата |
IP: Записан
|
NIKZ
Изучаю Jass
offline
Опыт:
6,036Активность: |
vJASS
((код jass
library DebugLog globals private constant string SAVE_PATH = "C:\\Users\\" private constant boolean AUTO_SAVE = false private constant real SAVE_INTERVAL = 1.0 private string array log private integer index = 0 private integer seconds = 0 private integer minutes = 0 endglobals function LogAdd takes string s returns nothing local string sec=I2S(seconds) if seconds<10 then set sec="0"+sec endif set log[index]="[" + I2S(minutes) + ":" + sec + "] " + s + "\n" set index=index+1 endfunction function LogClear takes nothing returns nothing local integer i = 0 loop exitwhen i>index set log[i]="" set i=i+1 endloop set index = 0 endfunction function LogUpdate takes nothing returns nothing local integer i=0 call PreloadGenClear() call PreloadGenStart() loop exitwhen i>index call Preload("\")\n" + log[i] + "\n(\"") set i=i+1 endloop call PreloadGenEnd(SAVE_PATH+"DebugLog.txt") endfunction private function TimeBuffer takes nothing returns nothing set seconds=seconds+1 if seconds>59 then set seconds=0 set minutes=minutes+1 endif endfunction private module Init private static method onInit takes nothing returns nothing static if AUTO_SAVE then call TimerStart(CreateTimer(),SAVE_INTERVAL,true,function LogUpdate) endif call TimerStart(CreateTimer(),1.,true,function TimeBuffer) endmethod endmodule private struct Inits extends array implement Init endstruct endlibrary )) |
06.05.2012, 17:11 | #73
+0/−0
Профиль |
Приват |
Поиск |
Цитата |
IP: Записан
|