HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Converting a complex trigger to JASS

01-13-2007, 05:39 PM#1
CaptainPicard
Any suggestions? I tried to do it last night and I wound up losing two hours of work because of a craash during save. I've downloaded the latest working copy from my backup to be safe, and started over with this.

I think I should:
- Make frequent saves
- Place modified custom text in a notepad editor outside WC3 for the find/replace utility, not to mention preservation of the text should something fall apart.

QUESTION:
Is it legal to place a function with arguments ("takes integer a", for example) inside a Condition( ) expression? I sure hope so.
EDIT: Nope, found the answer, it's not.

Thanks,
Capt. Picard
01-13-2007, 05:58 PM#2
SFilip
> in a notepad editor
I'd go for JassCraft or JSP instead.

> Is it legal to place a function with arguments ("takes integer a", for example) inside a Condition( ) expression
Unfortunately it isn't. There is probably a way around though, post your code if you want to see it.

As for the crash itself...you should read this. It explains just about all of the reasons for it to happen. You might also want to use PJass on your code...it can probably detect all of those issues.
01-13-2007, 06:00 PM#3
Captain Griffen
Or you could use a hacked editor (WEHelper/Grimoire). They don't crash.
01-14-2007, 06:59 AM#4
Chocobo
Quote:
Is it legal to place a function with arguments ("takes integer a", for example) inside a Condition( ) expression? I sure hope so.
EDIT: Nope, found the answer, it's not.

Simply because Condition() takes a code, codes can not have paramater lists but is able to return something. (like function MyCond takes nothing returns boolean)
And returns at end a conditionfunc.