| 10-18-2009, 05:09 PM | #1 |
Well like this i always follow instructions in every speel pack i download and with more or less troubles i succed implement them in my map. I download spellfactory4.1 map and start impementing speels! So i really need HELP! I done all this: i have caster system in my map i can import easily everything from object editor i have offcourse jasshelper(jassnewgenpack5d) BUT when i copy Spell Templates category in my map,and try to save map a BOUNCH of UNDECLERED FUNCTION ERRORS! And one more thing,sommetimes when i import somme triggers from other maps(not only this one),like JASS speels and save map,try to test it,warcraft 3 only opens,and thats it!There are no TEAMS on screen!... So i really need help!!!! Hope sommeone can help me. CHEERS !!! |
| 10-18-2009, 06:48 PM | #2 |
spells, BUNCH. I would have a remote clue as how to help you if you told me what the undeclared function errors are (what function name/ what code line) |
| 10-18-2009, 07:28 PM | #3 |
LINE 7570: Undeclared function GetAttachedUnit LINE 7576: Undeclared function GetAttachedGroup LINE7614: Undeclared function AttachObject and so....like 100 errors line 7570 is: local unit u=GetAttachedUnit(x , "u") line 7576 is: local group g=GetAttachedGroup(x , "g") line 7614 is: call AttachObject(t , "u" , u) PLS HELP ME if you can,i really want to use those speels!! |
| 10-18-2009, 09:26 PM | #4 |
Hmnn, it seems those templates are using code that is not compatible with patch 1.24. So, you should try replacing your CSCache with this: JASS:/******************************************************************************************* Faux CSCache AttachVars ---------------- Do not use these functions for new stuff, it is just not the right thing to do... The intention of Faux Handle Vars is to be a patch fix for a map's migration to patch 1.24 This library might not cover all uses of handle vars, some of them are just impossible with the new rules set in patches 1.23b and 1.24, but they should work for most of the cases.... All of them but the SetHandle*** ones are inline friendly. I follow the interface in official Kattana's handle vars from wc3jass.com, if your handle vars functions look different, then you were not using handle vars but another thing... *******************************************************************************************/ //========================================================================================== library CSCache requires CSSafeCache initializer init globals private hashtable ht endglobals // too bad the Handle vars' old functionality forces me to make these things // inline-unfriendly function AttachObject takes agent subject, string label, agent value returns nothing if(value==null) then call RemoveSavedHandle( ht, GetAttachedId(subject), StringHash(label)) else call SaveAgentHandle( ht, GetAttachedId(subject), StringHash(label), value) endif endfunction function AttachInt takes agent subject, string label, integer value returns nothing if value==0 then call RemoveSavedInteger(ht, GetAttachedId(subject), StringHash(label)) else call SaveInteger(ht, GetAttachedId(subject), StringHash(label), value) endif endfunction function AttachBoolean takes agent subject, string label, boolean value returns nothing if (value == false) then call RemoveSavedBoolean(ht, GetAttachedId(subject), StringHash(label)) else call SaveBoolean(ht, GetAttachedId(subject), StringHash(label), value) endif endfunction function AttachReal takes agent subject, string label, real value returns nothing if (value == 0.0) then call RemoveSavedReal(ht, GetAttachedId(subject), StringHash(label)) else call SaveReal(ht, GetAttachedId(subject), StringHash(label), value) endif endfunction function AttachString takes agent subject, string label, string value returns nothing if ((value=="") or (value==null)) then call RemoveSavedString(ht, GetAttachedId(subject), StringHash(label)) else call SaveStr(ht, GetAttachedId(subject), StringHash(label), value) //yay for blizz' consistent naming scheme... endif endfunction function GetAttachedHandle takes agent subject, string label returns agent debug call BJDebugMsg("[debug] What the heck? Why would you call HandleHandle I guess this was caused by a search and replace mistake") return null endfunction // these are inline friendly, ok, maybe they aren't because jasshelper does not recognize // GetAttachedId as non-state changing. But they will be once I fix jasshelper... function GetAttachedInt takes agent subject, string label returns integer return LoadInteger(ht, GetAttachedId(subject), StringHash(label)) endfunction function GetAttachedBoolean takes agent subject, string label returns boolean return LoadBoolean(ht, GetAttachedId(subject), StringHash(label)) endfunction function GetAttachedString takes agent subject, string label returns string return LoadStr(ht, GetAttachedId(subject), StringHash(label)) endfunction function GetAttachedReal takes agent subject, string label returns real return LoadReal(ht, GetAttachedId(subject), StringHash(label)) endfunction // got bored so I now use a textmacro... //! textmacro FAUX_HANDLE_VARS_GetAttachedHandle takes NAME, TYPE function Attach$NAME$ takes agent subject, string label, $TYPE$ value returns nothing if(value==null) then call RemoveSavedHandle( ht, GetAttachedId(subject), StringHash(label)) else call Save$NAME$Handle( ht, GetAttachedId(subject), StringHash(label), value) endif endfunction function GetAttache$NAME$ takes agent subject, string label returns $TYPE$ return Load$NAME$Handle( ht, GetAttachedId(subject), StringHash(label)) endfunction //! endtextmacro //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Player","player") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Widget","widget") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Destructable","destructable") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Item","item") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Unit","unit") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Ability","ability") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Timer","timer") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Trigger","trigger") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("TriggerCondition","triggercondition") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("TriggerAction","triggeraction") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("TriggerEvent","event") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Force","force") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Group","group") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Location","location") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Rect","rect") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("BooleanExpr","boolexpr") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Sound","sound") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Effect","effect") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("UnitPool","unitpool") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("ItemPool","itempool") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Quest","quest") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("QuestItem","questitem") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("DefeatCondition","defeatcondition") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("TimerDialog","timerdialog") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Leaderboard","leaderboard") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Multiboard","multiboard") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("MultiboardItem","multiboarditem") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Trackable","trackable") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Dialog","dialog") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Button","button") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("TextTag","texttag") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Lightning","lightning") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Image","image") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Ubersplat","ubersplat") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Region","region") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("FogState","fogstate") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("FogModifier","fogmodifier") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Hashtable","hashtable") function CleanAttachedVars takes agent subject returns nothing call FlushChildHashtable(ht, GetAttachedId(subject)) endfunction private function init takes nothing returns nothing set ht=InitHashtable() endfunction endlibrary |
| 10-18-2009, 10:26 PM | #5 |
Didnt work same errors,and i am testing maps and creating them on patch 2.1b,if that helps! |
| 10-18-2009, 10:57 PM | #6 |
Same errors? I don't think so, post the first few errors. And use 1.24b |
| 10-19-2009, 09:23 AM | #7 |
LINE 7570: Undeclared function GetAttachedUnit( local unit u=GetAttachedUnit(x , "u") ) Others are the same too! And i use now 1.24b patch! |
| 10-19-2009, 11:39 AM | #8 |
Hmnn, at least GetAttachedUnit should be in the map after you paste the faux CSCache. Try finding out what's the trigger in which the first error appears and post it here. |
| 10-19-2009, 06:12 PM | #9 |
I get it in trigger Nova Spells,at Nova template code part! |
| 10-20-2009, 07:24 PM | #10 |
Comme on sommeone i really need help about this! |
| 10-20-2009, 07:53 PM | #11 |
well, it would have been more helpful if you posted the actual code, but I'll try fixing it somehow. |
| 10-20-2009, 08:13 PM | #12 |
@ Vex: JASS:// got bored so I now use a textmacro... //! textmacro FAUX_HANDLE_VARS_GetAttachedHandle takes NAME, TYPE function Attach$NAME$ takes agent subject, string label, $TYPE$ value returns nothing if(value==null) then call RemoveSavedHandle( ht, GetAttachedId(subject), StringHash(label)) else call Save$NAME$Handle( ht, GetAttachedId(subject), StringHash(label), value) endif endfunction function GetAttache$NAME$ takes agent subject, string label returns $TYPE$ return Load$NAME$Handle( ht, GetAttachedId(subject), StringHash(label)) endfunction |
| 10-20-2009, 08:52 PM | #13 |
Which script(trigger)is that? |
| 10-20-2009, 08:56 PM | #14 |
The one I posted. Try this new one, Moridin, it should work (or at least change the syntax errors) JASS:/******************************************************************************************* Faux CSCache AttachVars ---------------- Do not use these functions for new stuff, it is just not the right thing to do... The intention of Faux Handle Vars is to be a patch fix for a map's migration to patch 1.24 This library might not cover all uses of handle vars, some of them are just impossible with the new rules set in patches 1.23b and 1.24, but they should work for most of the cases.... All of them but the SetHandle*** ones are inline friendly. I follow the interface in official Kattana's handle vars from wc3jass.com, if your handle vars functions look different, then you were not using handle vars but another thing... *******************************************************************************************/ //========================================================================================== library CSCache requires CSSafeCache initializer init globals private hashtable ht endglobals // too bad the Handle vars' old functionality forces me to make these things // inline-unfriendly function AttachObject takes agent subject, string label, agent value returns nothing if(value==null) then call RemoveSavedHandle( ht, GetAttachedId(subject), StringHash(label)) else call SaveAgentHandle( ht, GetAttachedId(subject), StringHash(label), value) endif endfunction function AttachInt takes agent subject, string label, integer value returns nothing if value==0 then call RemoveSavedInteger(ht, GetAttachedId(subject), StringHash(label)) else call SaveInteger(ht, GetAttachedId(subject), StringHash(label), value) endif endfunction function AttachBoolean takes agent subject, string label, boolean value returns nothing if (value == false) then call RemoveSavedBoolean(ht, GetAttachedId(subject), StringHash(label)) else call SaveBoolean(ht, GetAttachedId(subject), StringHash(label), value) endif endfunction function AttachReal takes agent subject, string label, real value returns nothing if (value == 0.0) then call RemoveSavedReal(ht, GetAttachedId(subject), StringHash(label)) else call SaveReal(ht, GetAttachedId(subject), StringHash(label), value) endif endfunction function AttachString takes agent subject, string label, string value returns nothing if ((value=="") or (value==null)) then call RemoveSavedString(ht, GetAttachedId(subject), StringHash(label)) else call SaveStr(ht, GetAttachedId(subject), StringHash(label), value) //yay for blizz' consistent naming scheme... endif endfunction function GetAttachedHandle takes agent subject, string label returns agent debug call BJDebugMsg("[debug] What the heck? Why would you call HandleHandle I guess this was caused by a search and replace mistake") return null endfunction // these are inline friendly, ok, maybe they aren't because jasshelper does not recognize // GetAttachedId as non-state changing. But they will be once I fix jasshelper... function GetAttachedInt takes agent subject, string label returns integer return LoadInteger(ht, GetAttachedId(subject), StringHash(label)) endfunction function GetAttachedBoolean takes agent subject, string label returns boolean return LoadBoolean(ht, GetAttachedId(subject), StringHash(label)) endfunction function GetAttachedString takes agent subject, string label returns string return LoadStr(ht, GetAttachedId(subject), StringHash(label)) endfunction function GetAttachedReal takes agent subject, string label returns real return LoadReal(ht, GetAttachedId(subject), StringHash(label)) endfunction // got bored so I now use a textmacro... //! textmacro FAUX_HANDLE_VARS_GetAttachedHandle takes NAME, TYPE function Attach$NAME$ takes agent subject, string label, $TYPE$ value returns nothing if(value==null) then call RemoveSavedHandle( ht, GetAttachedId(subject), StringHash(label)) else call Save$NAME$Handle( ht, GetAttachedId(subject), StringHash(label), value) endif endfunction function GetAttached$NAME$ takes agent subject, string label returns $TYPE$ return Load$NAME$Handle( ht, GetAttachedId(subject), StringHash(label)) endfunction //! endtextmacro //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Player","player") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Widget","widget") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Destructable","destructable") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Item","item") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Unit","unit") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Ability","ability") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Timer","timer") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Trigger","trigger") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("TriggerCondition","triggercondition") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("TriggerAction","triggeraction") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("TriggerEvent","event") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Force","force") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Group","group") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Location","location") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Rect","rect") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("BooleanExpr","boolexpr") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Sound","sound") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Effect","effect") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("UnitPool","unitpool") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("ItemPool","itempool") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Quest","quest") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("QuestItem","questitem") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("DefeatCondition","defeatcondition") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("TimerDialog","timerdialog") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Leaderboard","leaderboard") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Multiboard","multiboard") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("MultiboardItem","multiboarditem") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Trackable","trackable") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Dialog","dialog") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Button","button") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("TextTag","texttag") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Lightning","lightning") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Image","image") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Ubersplat","ubersplat") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Region","region") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("FogState","fogstate") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("FogModifier","fogmodifier") //! runtextmacro FAUX_HANDLE_VARS_GetAttachedHandle("Hashtable","hashtable") function CleanAttachedVars takes agent subject returns nothing call FlushChildHashtable(ht, GetAttachedId(subject)) endfunction private function init takes nothing returns nothing set ht=InitHashtable() endfunction endlibrary |
| 10-20-2009, 09:39 PM | #15 |
Now it is on the line 7572,7578,so not the same line bur same errors! And i am using cs 15 version should i use newer,and dont have csCache,only CSSafeCache trigger,is that help you anyway...???? Thats it... |
