| 05-01-2007, 02:14 AM | #1 |
why does it say "undeclared function" in my spells when i have the handlevars in this trigger? JASS:// ===Kattana's Handle Vars=== function H2I takes handle h returns integer return h return 0 endfunction // =========================== function LocalVars takes nothing returns gamecache return InitGameCache("jasslocalvars.w3v") endfunction function SetHandleHandle takes handle subject, string name, handle value returns nothing if value==null then call FlushStoredInteger(LocalVars(),I2S(H2I(subject)),name) else call StoreInteger(LocalVars(), I2S(H2I(subject)), name, H2I(value)) endif endfunction function SetHandleInt takes handle subject, string name, integer value returns nothing if value==0 then call FlushStoredInteger(LocalVars(),I2S(H2I(subject)),name) else call StoreInteger(LocalVars(), I2S(H2I(subject)), name, value) endif endfunction function SetHandleReal takes handle subject, string name, real value returns nothing if value==0 then call FlushStoredReal(LocalVars(), I2S(H2I(subject)), name) else call StoreReal(LocalVars(), I2S(H2I(subject)), name, value) endif endfunction function GetHandleInt takes handle subject, string name returns integer return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name) endfunction function GetHandleReal takes handle subject, string name returns real return GetStoredReal(LocalVars(), I2S(H2I(subject)), name) endfunction function GetHandleUnit takes handle subject, string name returns unit return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name) return null endfunction function FlushHandleLocals takes handle subject returns nothing call FlushStoredMission(LocalVars(), I2S(H2I(subject)) ) endfunction function InitTrig_Needed_Functions takes nothing returns nothing endfunction Is there something i have to do to that trigger? |
| 05-01-2007, 02:42 AM | #2 |
which function it says is undecleared? pls next time describe more detailed. Remember not everyone like to read trough entire script, u need to point out where the error is |
| 05-01-2007, 03:29 AM | #3 |
All of them...If you just read the top, you know its the handle vars...I am using the handle vars in my abilities for my map and the handle vars are coming undeclared. The script is not that big anyway. |
| 05-01-2007, 08:21 AM | #4 |
The functions are in some random trigger. They might not be above the script which requires them. Either put them in custom script section of library them. |
| 05-01-2007, 07:36 PM | #5 |
How do you library them? |
| 05-01-2007, 09:56 PM | #6 |
You need vJASS. The //! lines begin and end libraries. |
| 05-02-2007, 07:18 AM | #7 | |
Quote:
The //! does absolutely nothing on its own, and it's depreciated anyway. JASS:library //code endlibrary |
| 05-02-2007, 11:02 AM | #8 |
ugh, if you dont know where to put scripts, dont use vjass, its much more simpler... just click the root element named <urmap> and paste in the text box that says Add Map Specific Custom Script here |
| 05-03-2007, 02:33 AM | #9 |
What? Not that I use vJASS, but I thought it was JASS://! library SomeLibrary needs SomeOtherLibrary //... //! |
| 05-03-2007, 02:52 AM | #10 |
nope, the // has been deprecated (save textmacros) |
| 05-03-2007, 08:03 AM | #11 | |
Quote:
I think //! library etc will still work (although it's been depreciated). It's more the fact that you said "those //! lines begin and end libraries" when there are tons of things which could have //!. |
