• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

LUA + Objectmerger issue

Status
Not open for further replies.
Level 11
Joined
Aug 25, 2006
Messages
971
[Solved] LUA + Objectmerger issue

Sorry found that the "true" source of the error was coming from here:

JASS:
//! i setobjecttype("abilities")
//! i logf("Starting work on " .. R2MCode)
//! i if objectexists(R2MCode) then
//! i     logf("Modifying existing ability " .. R2MCode)
//! i     modifyobject(R2MCode)
//! i else
//! i     logf("Creating new ability " .. R2MCode)
//! i     createobject("A022",R2MCode)
//! i end
//! i makechange(current,"anam","R2M [" .. rangerCode .. "->" .. meleeCode .. "]")
//! i makechange(current,"Emeu",rangerCode)

Log snippet
setobjecttype abilities
Starting work on AM07
objectexists AM07
Modifying existing ability AM07
modifyobject AM07
makechange 0 anam
makechange 0 Emeu

That last change promptly stops the code dead in its tracks.
"A022" is an ability that does exist (Changing the name and generating the new ability works) and its based off of Abrf which does in fact have a field called Emeu which takes a rawcode.

What's going on here?


Edit: Solved! I can't believe how stupid I've been for the past couple of hours. Even if the ability only has one level I still have to include the level parameter in the call. /facepalm
 
Last edited:
Status
Not open for further replies.
Top