PDA

View Full Version : wtf?



Renian
04-23-2009, 03:13 PM
;k test
>Lich bug: wrong number of arguments (0 for 1)
Lich:2183:in `clear'
Lich:2183:in `kill'
Lich:5595
Lich:5397:in `initialize'
Lich:5397:in `new'
Lich:5397

Started triggering after starting a script that had the wrong number of arguments (0 for 1)...but then it doesn't seem to want to remove the script from the stack, and if you try to remove it yourself, it goes NO BITCH.

The error seems to stick even if you change your script back to before it was getting all pissy.

EDIT: Actually it looks like it causes an error for every script you try to start after it.
;huntotf2
--- Lich: huntotf2 active.
--- Error: huntotf2: wrong number of arguments (0 for 1)
--- Lich: huntotf2 has exited.

I didn't even try to start that script wtf!

The original script was something for a friend in DragonRealms using Lich.



if (!variable[1])
echo "You need to specify what you are going to forage!"
exit
end

def climb
fput "climb wall"
matchtimeout 3, "Roundtime"
waitrt?
until standing?
fput "stand"
matchtimeout 3, "You stand back up", "You struggle,"
end
end

def forage
target_line = String.new
until target_line =~ /You manage to find/
fput "forage " + variable[0]
target_line = matchtimeout 3, "You manage to find", "unable to find"
waitrt?
if target_line =~ /You manage to find/
if target_line =~ /grass/
mechlore_grass()
end
fput "put my " + variable[0] + " in bucket"
end
end
end


def mechlore_grass
fput "exp"
target_line = matchtimeout 5, "Mechanical Lore:"
if target_line !~ /mind lock/
target_line = String.new
until target_line =~ /You need to have more material/
waitrt?
fput "braid my grass"
target_line = matchtimeout 3, "on braiding your grass", "Frustration wells up as you", "You need to have more material"
end
end
end

def appraise
fput "appraise my workcoat"
matchtimeout 3, "Roundtime:"
sleep 1
waitrt?
end

def hide
fput "hide"
matchtimeout 3, "Roundtime:"
sleep 1
waitrt?
if hidden?
fput "unhide"
end
end

def main
climb()
appraise()
forage()
hide()
end

while true
main()
end

deadly
04-23-2009, 11:21 PM
your pic looks like he just took a massive crap!

Renian
04-24-2009, 05:21 AM
And I here I thought I was going to get a helpful, informed post.

I received neither, on both the on-topic and off-topic subjects.

Renian
04-25-2009, 09:56 PM
For future reference, I solved the problem...not in this script, but while working on a remake.

Basically, if you create a function with a name already used by Ruby, such as def clear(), it doesn't just cause your script to die. It causes Lich to fucking explode so hard. I think it improperly removes the script from the stack/fucks up its C pointers or something.

Point is: If you receive this error, google the reserved functions for Ruby and see if you made one on accident. Rename that function and win life.