[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Lua
. . -> [Subject]  My spellup script erred because of the latest version
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

My spellup script erred because of the latest version

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by porridge cat   (16 posts)  [Biography] bio
Date Sat 28 Apr 2007 08:05 PM (UTC)
Message
my version was 3.78 and i don't know what stuff has been changed... resulting in this error. finally! how to revise it?



-----------------------
DeleteTrigger("deleteall")
ArrayDelete "spells"
ArrayCreate "spells"

t = {
Shield = 1,
['Mental barrier'] = 1,
['Underwater breathing'] = 1,
Armor = 1,
Bless = 1,
Blur = 1,
['Enhanced strength'] = 1,
['Adrenaline control'] = 1,
Avoidance = 1,
Aid = 1,
['Thought shield'] = 1,
['Detect magic'] = 1,
['Detect invis'] = 1,
['Magic circle'] = 1,
['Mystic might'] = 1,
['Giant strength'] = 1,
['Inertial barrier'] = 1,
Accelerate =1,
Enlightenment =1,
Displacement =1,
['Harden body'] =1,
['Godly embrace'] =1,
['Flesh armor'] =1,
Absorb =1,
}

backt = {
['Energy containment'] =1,
['Magical rush'] =1,
['Prayer of fortune'] =1,
Sanctuary =1,
['Intellect fortress'] =1,
['Indestructible aura'] =1,
Perception =1,
['True seeing'] =1,
Frenzy =1,
['Stone skin'] =1,
Calculation =1,
['Divine swiftness'] =1,
Revelation =1,
Rally =1,
['Channel energy'] =1,
['Line of protection'] =1,
Warmth =1,
Compression =1,
['Antimagic shell'] =1,
Vaccinate =1,
Acidproof =1,
['Energy shield'] =1,
Awakening =1,
Shockproof =1,
['Holy mirror'] =1,
Lightspeed =1,
['Self harmony'] =1,
['Grey aura'] =1,
['Toxic resistance'] =1,
}

ArrayImport ("spells", t)

AddTriggerEx("deleteall", [[^You are affected by (.*?) and (.*?)]], [[

DeleteTrigger("casted")

local bb = ArrayListKeys ("spells")
if bb == nil then
--Note ("")
else
for k, v in pairs (ArrayListKeys ("spells")) do
Send ("cast ".."'"..v.."'")
end
end

DoAfterSpecial (1, [[
ArrayDelete "spells"
DeleteTrigger("deleteall")]], 12)

]], 1+32+1024, -1, 0, "", "", 12, 99)

AddTriggerEx("casted", [[^Spell \\: ([\\w\\s]+) \\(]], [[
ArrayDeleteKey ("spells", "%%1")
]], 1+32+1024, -1, 0, "", "", 12, 99)

Send ("saff")

[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Sat 28 Apr 2007 08:47 PM (UTC)
Message
Can you give the error message please? It is so hard to debug when people say "it gave an error".

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by porridge cat   (16 posts)  [Biography] bio
Date Reply #2 on Sat 28 Apr 2007 08:57 PM (UTC)
Message
Compile error
World: aardwolf
Immediate execution
[string "Alias: "]:83: unexpected symbol near ']'

thanks for the trouble you've taken~

[Go to top] top

Posted by Shaun Biggs   USA  (644 posts)  [Biography] bio
Date Reply #3 on Sat 28 Apr 2007 11:30 PM (UTC)
Message

DoAfterSpecial (1, [[
ArrayDelete "spells"
DeleteTrigger("deleteall")]], 12)

]], 1+32+1024, -1, 0, "", "", 12, 99)

The last line in this is line 83. The ]] doesn't pair with anything previous in the file. The [[ in line 79 pairs with the ]] in line 81, leaving no open brackets to close.

It is much easier to fight for one's ideals than to live up to them.
[Go to top] top

Posted by Shaun Biggs   USA  (644 posts)  [Biography] bio
Date Reply #4 on Sat 28 Apr 2007 11:49 PM (UTC)

Amended on Sun 29 Apr 2007 01:20 AM (UTC) by Shaun Biggs

Message
Also, just to enforce a suggestion in another thread, you should really be enabling and disabling the triggers instead of creating and destroying them. This is just a simple toggle, rather than making MUSHclient go through a much longer process having to muck about with the trigger queue repeatedly. For the mud you're playing on, I tend to walk around with 50 spells on at any given time, and having that much creation and deletion will cause a greater chance for errors.

Just keeping the trigger will also solve this error you are having, since you could just have a trigger made in the trigger config menu, and not have to make a long addtrigger function.

It is much easier to fight for one's ideals than to live up to them.
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


3,078 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]