| 04-12-2008, 12:21 PM | #1 |
When you declare a global, you can initialize it as CreateGroup(),CreateTimer(),CreateTrigger(),etc,. without any problems. That means this: JASS:globals timer TIMER = CreateTimer() group GROUP = CreateGroup() trigger TRIGGER = CreateTrigger() endglobals Does not have any problems. However, I stumbled upon a weird bug when I was going to test my map. I investigated and found out what's causing it, and it is this: JASS:globals multiboard GlobalBoard = CreateMultiboard() endglobals Apparently, it causes a fatal error when the loading screen begins. It bugs out instantly. I initialized it as multiboard GlobalBoard = null and there was no bug. If this has been posted/discussed before, apologies. This bothered me so I thought I'd do someone a favor and post it here for future reference. ~ Have a nice day! |
| 04-12-2008, 12:27 PM | #2 |
You cannot initialize multiboards when they are declared, its even warns you in GUI |
| 04-12-2008, 12:37 PM | #3 |
It says : Multiboards cannot be displayed at map initialization I wasn't trying to display it. I haven't seen any warning of multiboard initialization in GUI yet, I don't use GUI at all. |
| 04-12-2008, 01:41 PM | #4 |
Well when GUI means display they also mean create (or at least I think so). Anyways its a well known issue |
| 04-12-2008, 02:03 PM | #5 |
Many many objects cannot be created inside globals block... Try to create rect\region map will not able to load. |
| 04-12-2008, 02:35 PM | #6 | |
Quote:
imho only UI objects ~can't be created at init... |
| 04-13-2008, 01:12 AM | #7 |
Multiboard can't be created a map init. If you create them in a library init function, they will create, but be bugged (they have a perm row/col of -1). Solution: Create at 0.00 seconds (unnoticeable to any players). |
| 04-13-2008, 02:05 AM | #8 |
Don't call natives at globals init ... it accounts for op limit... |
