Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ scripting error

scripting error

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


Posted by Geraint   (4 posts)  Bio
Date Tue 30 Dec 2008 05:28 PM (UTC)
Message
First put this in bug reports, upon consideration.. I dont think it is a mush bug report!

--

This bug report popped up after the system cures an affliction.




Error number: 0
Event: Run-time error
Description: ...Hclient\ACS2\modules\scripts\plugins\afflictions.lua:709: attempt to call field '?' (a nil value)

stack traceback:

...Hclient\ACS2\modules\scripts\plugins\afflictions.lua:709: in function 'default'

...Hclient\ACS2\modules\scripts\plugins\afflictions.lua:715: in function '?'

...)\MUSHclient\ACS2\modules\scripts\plugins\prompt.lua:179: in function <...)\MUSHclient\ACS2\modules\scripts\plugins\prompt.lua:54>
Called by: Function/Sub: on_prompt called by trigger

Reason: processing trigger "PromptTrigger"


It also made every prompt line pop a line up that said "on_prompt" had an issue.

I really don't know that much about this business, and the system creator isn't around. Any direction as tow here to begin to fix this would be great, or maybe I did something stupid with settings!


Here we go

http://www.geocities.com/gd1960/luas.zip

the two LUA's it mentions are in that zip file, only place to upload was GeoShitties =\
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #1 on Tue 30 Dec 2008 05:39 PM (UTC)
Message
I've taken the liberty of removing your other post since you seem to want this one to be the reference post.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #2 on Tue 30 Dec 2008 07:37 PM (UTC)

Amended on Tue 30 Dec 2008 07:38 PM (UTC) by Nick Gammon

Message
It is hard to say, seeing as I didn't write any of this, but some debugging would help. Around line 709, where the error occurred, in file afflictions.lua, add the extra code in bold so it reads like this:


function afflict_default(affliction)
	local acknowledged = afflicted(affliction)

  if not cures[affliction] then   -- add these 3 lines
      Note ("No cure known for affliction ", affliction)
  else 	
  	if(acknowledged and acknowledged[2]) then
	  	cures[affliction]()
  	end
  end  -- add this too	
end


I am guessing that the variable "affliction" is set to something that is not in the cures table, and thus cures[affliction] is nil, and you cannot call a nil value.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Geraint   (4 posts)  Bio
Date Reply #3 on Tue 30 Dec 2008 11:05 PM (UTC)
Message
It helped find the problem lines, thakn you =D

I'm trying to see if I can fix it. It has some break lines that are wrong.


5268h, 5255m, 32080e, 29110w exdb-
Both of your legs must be free and unhindered to do that.
No cure known for affliction crippledleg
5268h, 5255m, 32080e, 29110w exdb-
No cure known for affliction crippledleg




Rean lets fly at you with a snap kick.
To your horror, your right leg has been mutilated beyond repair by ordinary
means.
He connects to the right leg!
parry right leg
5045h, 5255m, 32080e, 29110w exdb-
drink health
apply mending to legs
Rean balls up one fist and hammerfists you.
He connects to the right leg!
parry right leg
Your shield completely absorbs the damage.
5045h, 5255m, 32080e, 29110w exdb-
Rean balls up one fist and hammerfists you.
He connects to the right leg!
parry right leg
4641h, 5255m, 32080e, 29110w exdb-
You will now attempt to parry attacks to your right leg.
4641h, 5255m, 32080e, 29110w exdb-
You take a drink from a black-walnut vial.
The elixir heals and soothes you.
5900h, 5255m, 32080e, 29110w exdb-
You take out some salve and quickly rub it on your legs.
The salve fizzles away without effect.
5900h, 5255m, 32080e, 29110w exdb-



6636h, 5255m, 32080e, 29110w exdb-
Rean lets fly at you with a snap kick.
Your left leg is greatly damaged from the beating.
He connects to the left leg!
parry left leg
5733h, 5255m, 32070e, 29092w exdb-
apply mending to legs
Rean balls up one fist and hammerfists you.
He connects to the left leg!
parry left leg
5329h, 5255m, 32070e, 29092w exdb-
drink health
Rean balls up one fist and hammerfists you.
He connects to the left leg!
parry left leg
Your shield completely absorbs the damage.
5329h, 5255m, 32070e, 29092w exdb-
You will now attempt to parry attacks to your left leg.
5329h, 5255m, 32070e, 29092w exdb-
You take out some salve and quickly rub it on your legs.
The salve fizzles away without effect.
5329h, 5255m, 32070e, 29092w exdb-


In every case that it applied mending to legs, its hould've done apply restoration.

I'm a tinkerin! I dont know where the cure calls are, so I have to find those.
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.


11,032 views.

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

Go to topic:           Search the forum


[Go to top] top

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