Lua Help

_whelp

New Member
...
[ljass]//! i makechange(current, "aani", nil)[/ljass]
...

It keeps saying I need 4 arguments, including level, and when I add level it says: I need 3 arguments, excluding level.

What's wrong?
 
I'd check Grimoire or look in the Lua file usages ^_-. I don't use the external object extractor thingie mabob too often : o.

Let's see.. I'll check for u ^_-

Code:
setobjecttype("units") -- units, items, doodads, destructables, abilities, buffs, upgrades
mergefile("input.w3u", import) -- merge, replace, import

setobjecttype("doodads")
mergefile("input.w3d", replace)

setobjecttype("abilities")
mergefile("input.w3a", merge)
mergefile("more.w3a", merge)

if objectexists("AHbz") then
  modifyobject("AHbz")
  if (currentobject() == "AHbz") then
    logf(currentobjecttype(), currentobject()) -- write debug information to log
    makechange(current, "Tip", 3, "Lame Level 3 Tooltip")
    makechange(current, "Cool", 2, 99.5)
    makechange(current, "achd", 1)
    makechange(current, "alev", 4)
  end 
end

if objectexists("S000") then
  createobject("S000", "Sxyz") -- new id will be Sxyz
  if (currentobject() == "Sxyz") then
    logf(currentobjecttype(), currentobject()) -- write debug information to log
    makechange(current, "Hotkey", "Q")
    makechange(current, "Name", "My Chaos")
    makechange(current, "EditorSuffix", "(Peasant)")
    makechange(current, "CheckDep", 0)
    makechange(current, "Cha1", 1, "hpea")
  end
end

if objectexists("AHbz") then
  createobject("AHbz", generateid("AHbz")) -- new id will be generated as substitute for the passed AHbz id
  if (currentobject() ~= "") then -- "" would indicate that we do not have a current object
    logf(currentobjecttype(), currentobject()) -- write debug information to log
    makechange(current, "Levels", 10)
    makechange(current, "Tip", 6, "Blizzard Level 6")
    makechange(current, "ResearchTip", "Learn Blixxard")
    makechange(current, "Tip", 5, "fuckfuckfuckfuckfuck")
    resetchange(current, "Tip", 5) -- due to bad language
  end
  createobject("AHbz", generateid("AHbz"))
  if (currentobject() ~= "") then
    logf(currentobjecttype(), currentobject()) -- write debug information to log
    makechange(current, "Name", "LOL")
    resetobject(current)
  end
end

setobjecttype("doodads")
createobject("ZOss", generateid("ZOss"))
createobject("ZOss", generateid("ZOss"))
createdid = currentobject()

-- we set this again because the modded, unmodded and custom groups refer to the state of the last time we called setobjecttype
setobjecttype("doodads")
makechange(custom, "dmis", 0.55) -- min scale for all custom doodads
makechange(original, "dmas", 300) -- max scale for all original doodads
makechange(unmodded, "dmis", 0.99) -- min scale for all unmodded original doodads
resetchange(modded, "dmas") -- max scale for all modded original doodads
modifyobject(createdid)
resetobject(current) -- resetobject also works with custom, original, unmodded, modded groups
and there are samples ;o

The problem is you didn't put down enough lines, which is why I just gave you examples : p

Full usage is in grimext ; D
 
[ljass]//! i makechange(current, "aani", 1, nil)[/ljass]

Even doing that won't change anything. :(
I think you missed the point...

>The problem is you didn't put down enough lines, which is why I just gave you examples : p

hint hint

Code:
modifyobject("AHbz")
that opens up an object, meaning current object becomes that, etc...

Now I must get back to my Euphoria Preprocessing c# program work >: o
 

_whelp

New Member
Ehh...

JASS:

//! externalblock extension=lua ObjectMerger $FILENAME$
//! i setobjecttype("abilities")
//! i createobject("AHtc", "A001")
//! i makechange(current, "aani", 1, nil)
//! endexternalblock


That's what I have.

And it still doesn't seem to work.
 
Hm...

Guess try debugging because it looks right to me ><.

>if (currentobject() == "A001") then

>logf(currentobjecttype(), currentobject()) -- write debug information to log

etc ><. You can also output files to see what you are doing.. check out examples in my Lua JASS Generation thingie to learn basic I/O

That is what I'd personally do anyways ; )
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    Good luck to the hurricane path people. Is TH still in Houston?
  • Ghan Ghan:
    I think so
    +1
  • The Helper The Helper:
    Yeah we got nothing here did not even rain
  • Ghan Ghan:
    We could use some rain.
  • The Helper The Helper:
    I am not complaining though Hurricanes are not fun I have been through alot of them
  • Blackveiled Blackveiled:
    I evacuated for it just incase since I live in La Porte pretty much right on the water (in Houston area). Didn't see anything. It's a good thing for me anyways.
  • Ghan Ghan:
    It's too bad that Blizzard messed up so terribly with Reforged.
  • Ghan Ghan:
    Still has a 0.6 user metacritic score.
  • Ghan Ghan:
    (Out of 10)
  • Varine Varine:
    I haven't even tried it yet because everyone said it sucked. How do you get .6 out of ten?
  • The Helper The Helper:
    I am waiting for Dwarf Fortress to come out on Steam then I am on it.
  • Accname Accname:
    I play Dwarf Fortress from time to time.
  • Accname Accname:
    Its Okay.
  • Accname Accname:
    But the performance is sub-par. Does not seem to be well optimized.
  • Varine Varine:
    Is the Steam version coming with a graphical overlay or is it using the ASCII graphics still?
  • tom_mai78101 tom_mai78101:
    Steam version has the graphical overlay.
  • The Helper The Helper:
    Steam Version has graphics, a new interface and will be integrated in the steam mod stuff
  • Blackveiled Blackveiled:
    I didn't think WC3 Reforged was that bad. It pretty much did what it stated (to me at least), but then again I can care less about reforged campaigns and all that. I just care about gameplay.
  • Varine Varine:
    I think people were hoping for a resurgence in mod support. I have little interest in the actual game tbh
  • Varine Varine:
    Plus I know they added that Dota precedent clause where Blizzard can steal your shit which isn't cool.
  • Ghan Ghan:
    They sold Reforged to the community as primarily a huge graphical uplift with high res textures and redone cinematics.
  • Ghan Ghan:
    They even showed one of the redone cinematics at Blizzcon and that very cinematic wasn't even in the released game.
  • Ghan Ghan:
    So I think folks were angry about that.
  • Varine Varine:
    Didn't the backwards compatability have issues too?
  • Accname Accname:
    I never had any hopes for that. Blizzard is not the same company it was 10 years ago.

    Members online

    No members online now.

    Affiliates

    Hive Workshop
    Top