LieutenantEagle
Posts: 953
Member #27
Oct 20, 2002 24:01 |
MintMan, help!!
I am currently fighting Zandrohydromana. Guess what? It says 230/230 Health, NaN/183 Magic. HOW CAN I HAVE IMPOSSIBLE NUMBER MAGIC!? LieutenantEagle
President of the SMFC
---------------------
"Don't quote me on this, but I'm betting that pipe goes somewhere." ~Goombario (Paper Mario)
"All of you surrender now or I will burn you like bacon! Hmm...I'm hungry..." ~Master Bowser (Bowser World forums)
|
Dragon_Knight
Posts: 88
Member #49
Oct 20, 2002 10:35 |
Well, it's either you have no magic, or you have infinite magic, or it's a glitch. Well, i'm just guessing that, but if MM replied you'd get the full details. Blah blah blah. Not much to put down for a signature.
|
LieutenantEagle
Posts: 953
Member #27
Oct 20, 2002 12:08 |
Ahh shucks I lost the battle already. For some reason, tho, FoxMcBlur was able to cast Gash as normal. But...it said NaN?
Dragon_Knight, use common sense. It cannot be zero, because no one spell would take up 183 magic points (and definitely not KnockDown). NaN means "not a number". This is something like if you have the square root of -1.
Here's what I think happened. Here is the formula to magic spells, as far as I see it.
gash_cost = 30;
knockdown_cost = 35; //I'm not sure on this one
FoxMcBlur_magic = 183;
function knockdown()
{
FoxMcBlur_magic = FoxMcBlur_magic - 10root(knockdown_cost)^11
//beyond goes the speed decrease commands
}
.....Now if the 'knockdown_cost' variable has accidentally been made negative, then, as we all know, a square root command is impossible, and thus the NaN is achieved. The program probably self-corrected it as soon as I cast Gash. LieutenantEagle
President of the SMFC
---------------------
"Don't quote me on this, but I'm betting that pipe goes somewhere." ~Goombario (Paper Mario)
"All of you surrender now or I will burn you like bacon! Hmm...I'm hungry..." ~Master Bowser (Bowser World forums)
|
msanis
Posts: 454
Member #7
Oct 20, 2002 12:54 |
Uh oh, i remember a similar problem from the R.E. league a while back, i wonder how it suddenly got to B.D. Very strange... i bet this post was a stupid one....well maybe...
|
writer77
Posts: 409
Member #4
Oct 20, 2002 14:45 |
Actually that's not the only way it can be NaN. That also happens if you try to multiply a number by a word. Through the craziness of JavaScript, I've known that by sheer accident, some numbers end up being considered words by Javascript, which really messes up stuff. That's just from my personal experience though, Mintman'll figure it out soon enough.
And by the way, you lost horribly. I really like that way Mintman added the "flavor text," 'cause it's great to find out that I "Massacred" my opponent. Endless Horizon: http://www.angelfire.com/rpg/verdegym
"It looks like I'm going to die as I have lived.... completely surrounded by morons!"
-Bl. Mage
|
MintMan
Posts: 4061
Member #1
Oct 21, 2002 1:02 |
Well at least someone likes the new flavour text. Some people have actually been complaining about it for some reason. Oh well, old members are all that matters. Not like you new people. I hate you so much
*looks up to see the new people gathered around*
Oh, hello... um.... *runz*
Okay, yes, NaN is a very easy problem to come by in JavaScript and it did happen quite often in the R.E. League but usually due to F2S's buginess (it did occur a few other places, but I've since added safeties to prevent it). What I can't understand is why an NaN would pop up in Perl code. This is the first time I've ever seen it, in fact, and I've done some pretty freaky stuff with numbers before.
I know I have some extra handling on the magic-depletion protocol that can be removed. I had it there for purposes of ridding of floating-points that existed for a short time in the current magic numbers. Beyond that, I really don't know what to say.
And LE, for the love of all in programming, what the Hel was that sample code you gave? I've never seen anything so atrocious in my entire life! I mean, so many variables -- so loosely organized! The code more looks like this:
... 'Kamaitachi' => { ... 'spell' > [ 'Gash Bestial attack_20' ... }
...
@spell = split(/ /, $battle[$_[0]]{'spell'}[$ai]);
foreach $eff (split(/~/, $spell[2]))
{
...
... and so on for parsing the many spells of BD in a string form, not an incompitent multiple variable thing. Such a program would take forever to program and run under any language. I mean, even in C you would at least use const structures or something, and spells in BD don't have unique cost, but rather one formulatically determined.
|
Dragon_Knight
Posts: 88
Member #49
Oct 21, 2002 3:43 |
Hmmmmmm, if the code is all correct, how does it make a number multiply a word? This is Dragon_Knight, gym leader of the DarkShadow Gym
Visit the site to get a DarkShadow Badge!
|
LieutenantEagle
Posts: 953
Member #27
Oct 21, 2002 19:59 |
MintMan, have I ever told you that I only know HTML (72%) and JavaScript (17%)? I know my coding is stupid, but I just want to prove a point. Okay!!!??? Just because you're so good at programming doesn't mean that you get to put down the programming of...people that aren't that good at it. LieutenantEagle
President of the SMFC
---------------------
"Don't quote me on this, but I'm betting that pipe goes somewhere." ~Goombario (Paper Mario)
"All of you surrender now or I will burn you like bacon! Hmm...I'm hungry..." ~Master Bowser (Bowser World forums)
|
MintMan
Posts: 4061
Member #1
Oct 22, 2002 1:33 |
It is just that using that kind of system is bad habit to start. Avoid now or it will forever remain a folly.
And Knight, it doesn't have to multiply string-by-numbers. There could be a number of things that result in NaN. And who ever said the code was correct? I sure didn't....
*checks* Yeah, I don't think I did.
|
SailorSassyStar
Posts: 419
Member #19
Oct 22, 2002 17:49 |
Uhhh...I'm sorta lost. My mp has been saying NaN alot lately too. It doesn't really directly affect the battle, does it? I somehow thought that it meant that I was to low on magic to cast another spell, because it wasn't saying NaN until towards the end of battle after several magic attacks. LE and MM, please no more coding stuff. I sorta get lost and tend to stop reading the topic, even if it could be important to me. If there is something wrong, it's probably my fault. *SailorSassyStar* PurpleStarPink
My new site which is under major construction VanillaFudge
|
LieutenantEagle
Posts: 953
Member #27
Oct 24, 2002 24:36 |
Well here we are again at NaN magic! This time vs. Fallen, which is a bad thing.
It always happens when I cast KnockDown...why? LieutenantEagle
President of the SMFC
---------------------
"Don't quote me on this, but I'm betting that pipe goes somewhere." ~Goombario (Paper Mario)
"All of you surrender now or I will burn you like bacon! Hmm...I'm hungry..." ~Master Bowser (Bowser World forums)
|
MintMan
Posts: 4061
Member #1
Oct 24, 2002 17:08 |
My guess is that it has been happening after I changed the magic depletion system, so it is not just your Knock Down.
Okay, if it happened again, that means the int() isn't to blame. Huh, I wonder why it's doing this. I'm copying the same thing I use to calculate win ratios, and they aren't resulting in NaN.
I'll have to look into it some more.
|
Dragon_Knight
Posts: 88
Member #49
Oct 25, 2002 8:56 |
Well, either I must be lucky, or the NaN bug hasn't affected hrimfaxi attacks. Out of my 6 battles, I never ever saw NaN before, or I was just away when it did. This is Dragon_Knight, gym leader of the DarkShadow Gym Visit the site to get a DarkShadow Badge!
- Dragon_Knight
|
SailorSassyStar
Posts: 419
Member #19
Oct 25, 2002 19:06 |
It is an unexscapable curse. It shall destroy all in its path having no mercy. Maybe not. What I meant to say was that it does affect hrimfaxis. How do I know? I have a hrimfaxi! Wow. You probably haven't experienced it because it has been mostly only in recent battles. I don't know if MintMan fixed it yet, but I guess I'll soon find out since I have challenged somebody. If there is something wrong, it's probably my fault. *SailorSassyStar* PurpleStarPink
My new site which is under major construction VanillaFudge
|
LieutenantEagle
Posts: 953
Member #27
Oct 25, 2002 19:09 |
Fallen, I hate you. Well at least it took the battle longer this time.
Guess what? It seems as if I actually have infinite magic power when this happens. I know that FoxMcBlur can only cast Gash 6 times. I cast above 180 points of magic total, I KNOW I did. LieutenantEagle
President of the SMFC
---------------------
"Don't quote me on this, but I'm betting that pipe goes somewhere." ~Goombario (Paper Mario)
"All of you surrender now or I will burn you like bacon! Hmm...I'm hungry..." ~Master Bowser (Bowser World forums)
|
Evenfall
Posts: 89
Member #32
Oct 25, 2002 22:06 |
Aww, we love you too, LE. *hugs LE and prepares to get beaten up*
I think just to be fair, I'll give Fox a break and not battle him for a while. I have Nidhoggs to slaughter. *grin*
Fox's resistance has actually impressed me a lot, and the amount of moves he gets against Fallen has been formidable. If Fallen had missed one Horn, he would've lost. Heck, if you hadn't Blurred on that final move, Fallen would've lost. I believe Fallen only had 80 or so helath left on his final move.
You're actually pretty lucky to get 10 shots on Fallen while I only get 4 against Fox. I guess it isn't Magic that's my problem, it's my speed. Even if I got the NaN error, I don't think it really would've affected my performance. *shrugs*
That Knockdown spell is really useful, I suggest using it in the future against your opponants. It's nice to have that sheer burst of speed over an enemy when you're already a speed demon. Just remember to match your defense over the opponant's strength. Just in case.
Looks like we're both going to be battling Zaheera and writer77 for a while until more people catch up with us. I can't wait till NightChild reaches level 15. Maybe then it'll be an even-matched fight for NC and Fallen.
|
writer77
Posts: 409
Member #4
Oct 26, 2002 12:38 |
Hmmm... that would probably be the fight against a monoceros I just accepted. Maybe without shadow burner or shadow blast, that was sorta stupid. Oh well, I guess we'll found out soon enough. Endless Horizon: http://www.angelfire.com/rpg/verdegym
"It looks like I'm going to die as I have lived.... completely surrounded by morons!"
-Bl. Mage
|
SailorSassyStar
Posts: 419
Member #19
Oct 26, 2002 16:34 |
I'm catching up! I finally made it up to level 8! WOOHOO! *gives everyone virtual brownies* I don't think MM would appretiate it if I stole the pie thing since I haven't been around that long. Ok, enough celebrating. I'm right below LE on the rankings. I'm in another battle now and should be up again really soon now that there are people I can challenger without getting clobbered. I'm such a little stinker. I've been challenging some of people that NC has been leaving in the dust. Maybe they'll think twice before challenging a hrimfaxi again. Suckers.
Anyways, the NaN thing seems to be gone for me now. Then again, that last battle was so ridiicously *spelled incorrectly* fast that I didn't have time to check in from the begining to the end. How'd ya like that? The whole thing was over within about 5 hours. Sorry, but I just feel really good. *relises that DoomStar is quickly gaining on her* Head for the hills! If there is something wrong, it's probably my fault. *SailorSassyStar* PurpleStarPink
My new site which is under major construction VanillaFudge
|
MintMan
Posts: 4061
Member #1
Oct 26, 2002 21:31 |
I'd actually prefer if you did use virtual pie, SSS. Everyone else does, plus it is less suggest than brownies and their illicit capabilitis.
Well in all of my recent fights, NightChild hasn't been getting NaN. When is the last time you guys saw it?
Yes, NaN does act as a sort of Infinity for Magic, which is precisely why I'm trying to get rid of it so much.
Yeah, NightChild is level nine and on the first page of the rankings! I just passed you up, Sailor, which is a shame, too, because I really wanted to fight you. I was forced to fight KatanaMew two times since there was no one else my level (and power range). Oh well, just a little bit more and I can try to figure out if I stand a chance against Fallen. With my mad web site hits, I might be able to get in enough attacks to make a difference.
|
LieutenantEagle
Posts: 953
Member #27
Oct 26, 2002 22:55 |
I am...right above SSS!!!!!!!!!!!??????????/
IMPOSSIBLE! I couldn't have dropped so low in rank in oh...3 days! Err...well...maybe I could. Legend of Zelda: A Link to the Past has been detaining me. Just got it. LieutenantEagle
President of the SMFC
---------------------
"Don't quote me on this, but I'm betting that pipe goes somewhere." ~Goombario (Paper Mario)
"All of you surrender now or I will burn you like bacon! Hmm...I'm hungry..." ~Master Bowser (Bowser World forums)
|