Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
I swear to god, the thing has already corrupted once today. There was a fatal error on init (Deleting all of the things id changed during the day didnt fix it) so I had to redo hours of work. This time, the triggers arent running. The init message doesn't display, so I dont know how much more screwed this can get.
I've attatched the map with a desperate hope that someone will be able to get it work. If you do I will love you forever :3
Recent changes: modified a few rune related abilities
Added "Rune drop" Trigger in items folder
Added "runedrop" variable array
Set "runedrop" variable array in the init trigger
You crash the main thread that initializes the triggers. There is an execution limit for each thread and you hit it by having set three large variable arrays (8192), the "size" you give in GUI is not the actual amount of fields the variable will possess but rather up to which index the members are initialized with the preset value. So this created loops with 8192 iterations, accumulating a lot of operations.
The soution is too simple. I had this problem too a half year ago. The whole thing is a "block" that prevents that warcraft kill your computer. I see that you put 8192 array sizes and they are allways inneed. Array size is just good for that if you want to have all e.g. 5 or 19 (integer). It looks like in jass:
JASS:
set i = 0
loop
exitwhen ( i > 8192 )
set udg_AVARIABLE[i]=0
set i = i + 1
endloop
It looks like in GUI:
GUI
Events
Map initialization
Conditions
Actions
Do Multiple ActionsFor each (Integer A) from 1 to 8192, do (Actions)
Loop - Actions
Set ANYVARIABLE[(Integer A)] = 0
So you set the whole variables but warcraft can do LIMITED amount of functions ( variable set ) at a trigger. Just about 10000 of Set function. Others will be skipped.
So why it isn't working?? The whole thing fails at the Initialization at variable set up because:
JASS:
function main takes nothing returns nothing
call SetCameraBounds(- 8192.0 + GetCameraMargin(CAMERA_MARGIN_LEFT) , - 8192.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM) , 8192.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT) , 8192.0 - GetCameraMargin(CAMERA_MARGIN_TOP) , - 8192.0 + GetCameraMargin(CAMERA_MARGIN_LEFT) , 8192.0 - GetCameraMargin(CAMERA_MARGIN_TOP) , 8192.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT) , - 8192.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM))
call SetDayNightModels("Environment\\DNC\\DNCLordaeron\\DNCLordaeronTerrain\\DNCLordaeronTerrain.mdl" , "Environment\\DNC\\DNCLordaeron\\DNCLordaeronUnit\\DNCLordaeronUnit.mdl")
call SetTerrainFogEx(0 , 1000.0 , 9000.0 , 0.000 , 0.396 , 0.361 , 0.239)
call NewSoundEnvironment("Default")
call SetAmbientDaySound("BarrensDay")
call SetAmbientNightSound("BarrensNight")
call SetMapMusic("Music" , true , 0)
call InitSounds()
call CreateRegions()
call CreateAllDestructables()
call CreateAllItems()
call CreateAllUnits()
call InitBlizzard()
call ExecuteFunc("jasshelper__initstructs8392421")
call ExecuteFunc("Acceleration___Init") // It still OK here
call InitGlobals() // Variable setup FAILS!!! Too much action ( About 40000 on your map of maximal 10000 :S ) so the remaining will not be run.
call InitCustomTriggers() // JASS triggers - It will not be run.
call RunInitializationTriggers() // GUI triggers - This won't be too
: (
endfunction
How to prevent that?? Simply. Try not to use Variable Arrays which is bigger than 1.
But how can I use variable arrays bigger than 1?
The same way as 1. All variable types got a base value. ( Almost all null )
A simple var calling
Events
Map initialization
Conditions
Actions
-------- ANYVARIABLE's size is just 1 --------
Game - Display to (All players) the text: (String(ANYVARIABLE[121]))
It will show you 0 but ANYVAR[121] is not edited.
Integer base = 0
Real base = 0.00
Boolean base = true or false I think
Unit = no unit = null
Dialog = new dialog
and others are null
Thanks for the help guys. Are you saying that any index will work with a variable array even if the array size is set to 1? I don't think I understand too well..
Yes, jass arrays always range from 0 to 8191 (yet the last index is not saved/loaded when saving/loading the game). The fields are just not initialized with a value, well actually arrays have a null value. You can set the members when you need them or if it's necessary to preallocate the whole array, do it in a separate thread, e.g. in a Map Initialization trigger.
Jass arrays are actually array lists with a mximum size of 8192 elements. Proper arrays have to be difined a certain size and do not dynamicly expand on demand as the ones in JASS do.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.