- Joined
- Dec 5, 2011
- Messages
- 13
When open and save map have Jass, i meet errors.
http://www.upanh.com/jassloi_upanh/v/cnb02q6k7jx.htm
http://www.upanh.com/jassloi_upanh/v/cnb02q6k7jx.htm
This is the problem. In the map script, the CustomPolledWait function must be declared above all references to it.You make reference to a "CustomPolledWait" fuction in your JASS script. This function must not have been declared or is declared after you reference it. Remember that you can only call functions that are located above the position of calling within the script file.
function CustomPolledWait takes real duration returns nothing
local real timeRemaining
local real st=TimerGetElapsed( bj_gameStartedTimer)
if st <= 0 then
set bj_gameStartedTimer = CreateTimer()
call TimerStart(bj_gameStartedTimer, 1000000, false, null)
endif
if (duration > 0) then
loop
set timeRemaining = duration - TimerGetElapsed( bj_gameStartedTimer) + st
exitwhen timeRemaining <= 0
if (timeRemaining > bj_POLLED_WAIT_SKIP_THRESHOLD) then
call TriggerSleepAction(0.1 * timeRemaining)
else
call TriggerSleepAction(bj_POLLED_WAIT_INTERVAL)
endif
endloop
endif
endfunction
It is impossible to have a constant array due to how the language opperates.private constant real array MAX_X_DAMAGE
Please report this to the maker of the ability as this is a major error.private real array MAX_X_DAMAGE
What on earth do you think I have done? Ofcourse I did that...u can download and test save map.
Well you thought wrong... It is impossible to have a constant array in JASS thus why it is generating a syntax error. Where as saving generated syntax errors with the version I downloaded, once I corrected the line detailed above all syntax errors vanished and the map saved perfectly (no errors). The reason is because JASS does not allow you to initialize arrays to a value. Constants require being initialized to a value (when they are declared they must be given a value) so it is impossible to declare a constant array in JASS.i think not errow in map.
WarCraft III RoC and its expansion TFT. The map however uses VJASS so you will want to use the third party editor expansion JNGP (Jass New Generation Pack).if i want use jass, what i must install ?