HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Why Me?

12-19-2006, 10:08 AM#1
xombie
Okay, I was touching up on a system I've been working on when I hit test map and suddenly nothing works. I think, oh okay so the custom script has crashed the thread or something (by the way it got past the PJass check and the W.E. default check) so I try to find the bug. I can't find it anywhere, so I delete the whole custom script and the only trigger I have in my blank map is:
Trigger:
Events - Map Initialization
Conditions -
Collapse Actions -
Create 1 (Footman) for (Player (1)) at (Center of (Playable Map Area)) Facing (Default Building Angle)
This isn't exact but its true, this is the ONLY thing that is in my map and it fails to work.
12-19-2006, 10:40 AM#2
BertTheJasser
Plx attach the map, so we can check war3map.j for any strangeness
12-19-2006, 08:10 PM#3
Anopob
Never heard of this bug. The only REALLY gay bug I've heard is that if you make a serious/weird JASS bug in the normal World Editor, then it will crash. When you open it up, all the Object Editor fields you've customed (along with the player properties) will become stuff like TRIGSTR_###.
12-19-2006, 10:04 PM#4
xombie
Yea maybe I corrupted the map or something lol, woohoo?
Attached Files
File type: txtMapScript.txt (11.7 KB)
12-19-2006, 10:38 PM#5
Anopob
Try putting your script into something like JASSCraft and check for errors. My map was like half-corrupted (before), I edited a mistake from JASSCraft to my map, and my map worked
12-19-2006, 10:50 PM#6
wyrmlord
Code:
C:\Documents and Settings\User\Desktop\Program>pjass common.j blizzard.j mapscri
pt.txt
Parse successful:     2304 lines: common.j
Parse successful:     9733 lines: blizzard.j
Unrecognized character in line 1: ∩ (ASCII -17)
Unrecognized character in line 1: ╗ (ASCII -69)
Unrecognized character in line 1: ┐ (ASCII -65)
Parse successful:      341 lines: mapscript.txt
Parse successful:    12378 lines: <total>
This is the output I got from PJASS. Also, I believe I found your problem Xombie. Array indexes can contain a maximum of 8192 elements (0-8191) right? If so, take a look specifically at this:
Collapse JASS:
loop
    exitwhen i==8193
    if udg_Unit[i]==u then
        return i
    endif
    set i=i+1
endloop
The largest index this code will refer to will be 8192, which is a problem because arrays can't go that high. That's just from a quick look at the code.
12-20-2006, 12:00 AM#7
xombie
Keep in mind the trigger you are referring to is disabled. In a further test I actually deleted that section of code from the map entirely, and it still did not work.
12-20-2006, 01:52 AM#8
Dalten
Maybe this will help, I ran into this once too: Defining too many variable arrays with huge sizes will cause this. If you are defining any basic data types such as int, real, bool, etc, just leave the array sizes at 1, don't worry you can still use the full array during the game.
12-20-2006, 01:57 AM#9
Anopob
I guess that's true. Just use set (array) = low #. You don't need to use 500, use 0-50, etc. Also, if you have troubles still, post xombie!
12-20-2006, 02:18 AM#10
xombie
Wow, that actually worked. I set all of the array sizes to 1 (I knew before that declaring an array automatically gave you an array of 8192, but I had no idea declaration actually mattered). Anyways, GJ Dalten, +rep
12-20-2006, 02:26 AM#11
Ammorth
Watch-out though, Iv heard of cases that people have referenced uninitialized arrays in a variable and got strange results. Can't remember the exact details, but I think one had their map crash with an error. It's never happened to me though, but you never know when the boogy-monster will get you.
12-20-2006, 02:49 AM#12
xombie
Yea it seems that way especially with me.
12-20-2006, 06:17 AM#13
Captain Griffen
If you reference an un-initialised variable, the thread will crash. If you need to initialise (a) big variable array(s), then do it in a function run in it's own thread (trigger at map init, ExecuteFunc, etc.).
12-20-2006, 06:31 AM#14
Captain Griffen
If you reference an un-initialised variable, the thread will crash. If you need to initialise (a) big variable array(s), then do it in a function run in it's own thread (trigger at map init, ExecuteFunc, etc.).
12-20-2006, 06:34 AM#15
PitzerMike
Array initialization took so long that you reached the op limit before your triggers had been registered.