YesNoOk
avatar

SetVar out of range error (Read 604 times)

Started by TinFoilMkIV, March 19, 2010, 06:32:51 pm
Share this topic:
SetVar out of range error
#1  March 19, 2010, 06:32:51 pm
  • *
    • droidz.org/
Alright, well I'm having an issue with the error message saying that my SetVar is out of range, and it seems like the SetVar controller is then having no effect. I'd have to guess that it somehow means that although the SetVar is supposed to be active, it is somehow unable to use it, and thus the error. However that's only my guess, as I don't really know exactly what this means, which is making it rather hard to fix, which is why I'm asking about it.

Also does anyone know what the "WARNING: player <name> IN STATE 705:  310:  no" message is all about?

I seem to get that (or similar messages, just with different state numbers) in every attack state I currently have and not really sure how much I should be worrying about it.
Re: SetVar out of range error
#2  March 19, 2010, 09:32:45 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
The debug message occurs due to mugenversion. If you have it as not 1.0, mugen replicates winmugens shitty bugs and doesn't make use of any of the new features.

As for setvar out of range. Umm, var needs to be 0-59 or 0-39 if it's float. Can't use any other values.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: SetVar out of range error
#3  March 19, 2010, 10:03:53 pm
  • *
    • droidz.org/
We'll I would have to assume that SysVar(5) is within the 0-59 range, so unless there are some other limitations of which I don't know, I would say that's no the problem.

And since I did use an old mugen char as a template, it probably is set as the old vers, However I'm not exactly sure where to go to fix that, so any pointers there woud be appreciated as well.
Re: SetVar out of range error
#4  March 19, 2010, 10:07:21 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Actually, i have no idea what the range of sysvar's is or what values they can have. Elecbyte never documented them at all.

Just use a standard var.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: SetVar out of range error
#5  March 21, 2010, 04:04:29 pm
  • *
    • droidz.org/
yea, I'll have to experiment with that to see.
Re: SetVar out of range error
#6  March 24, 2010, 01:30:28 pm
  • *
    • droidz.org/
Okay, so after goin back and messing around with the problem areas, I found that you were right about the actual variable being used. Apparently there are only 5 sysvars, from 0-4. Kinda unfortunate cuz I coulda used more, but oh well, not like using some of the standard vars will really hurt as long as I keep it documented so I don't screw it up later on, heh.

Also still kinda unsure about the whole attacking state warning thing, but seems like its not a critical issue, so I won't worry much about it for now.
Re: SetVar out of range error
#7  March 24, 2010, 08:25:26 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
If you are using mugen 1.0 and your mugenversion is NOT 1.0 inside the .def file, you get that warning.

In addition. Using 1.0 assumes you're coding things the way they're meant to be. Using an older version date causes legacy behaviour to occur. Legacy behaviour is generally buggy.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: SetVar out of range error
#8  March 25, 2010, 12:27:10 am
  • *
    • droidz.org/
alright, attack state issue fixed. Wasn't sure where the version was set at, then went back and realized I just overlooked it before. So yea, thats all good now.

Meanwhile I've encountered another issue, which may or may not be a real problem, and if it's caused by what I think it is it may not even be fixable really.

anyways, basically getting a warning for an equation dividing by zero. The equation involves dividing the Vel Y by the Vel X, and uses an ifelse to return a seperate equation in the case that Vel X is zero, which would otherwise cause problems due to the aforementioned issue of trying to divide by zero. It seems to me that even thought the division equation is not being used during the instance of Vel X being zero, MUGEN is still calculating the equation (or trying to) and returning an error. So I would imagine that provided my coding is correct it shouldn't be a problem, the only thing that has me concerned is that the error message is constantly shown even in situations where I know that Vel X is not 0. So altho I feel I have a good idea whats going on, I'm not certain about it.

Either way, the code seems to work correctly from what I've seen, but here's the equation that's causing the issue to look over in case I missed something.
Code:
fvar(2) = ifelse(vel x=0,vel y,vel y/abs(vel x))


EDIT: actually unless I'm mistaken I think the division by zero is being triggered during the hitpause (the code is active during an air hitstate) while the character is not moving.