Inactionable warnings in warnings.log.

Started by greg, Sun 29/12/2019 16:04:05

Previous topic - Next topic

greg

In my warnings.log, I'm getting a lot of entries that look like this:

> [R 456] SetCharacterIdle called while character view locked with SetCharacterView; idle ignored

Despite the outdated function names, I understand what this means: chr has a locked view at the at the time I'm calling chr.SetIdleView().  However, I'm not sure why this is a warning, as chr.SetIdleView() is still behaving exactly as I'd expect it to.  Namely, it's setting chr.IdleView, and though the idle animation won't play right now (since chr currently has a locked view), it will play sometime after chr.UnlockView() is called.

> [R 1110] Warning: ChangeCharacterView was used while the view was fixed - call ReleaseCharView first

I get this warning (also with outdated function names) if I call chr.ChangeView() while chr has a locked view.  However, that also behaves exactly as I expect it to, i.e. it clears the locked view and changes the character's normal view.

My question: is there a purpose to these warnings?  And in general, is warnings.log a useful debugging tool for people?

Thanks,
Greg

Cassiebsg

I think this error msgs are there to let you know that there might be a problem with your code. Imagine that you actually wanted the character to idle in that instance. This would tell you why it wasn't working.

Also, it might work now, but if someone "fixes" the engine code it might not work later, and you won't know why. Also not releasing the view first, might give unexpected results later on... I'm not sure.
There are those who believe that life here began out there...

eri0o

cCharacter.ChangeView(view_ID) actually means cCharacter.NormalView = view_ID . It's not exactly change Current View now, for animation purposes, which is done using LockView. For now, cCharacter.NormalView is readonly and one has to use cCharacter.ChangeView function, but this may change in the future as Cassiebsg pointed out.

SMF spam blocked by CleanTalk