Jump to content
thirith

How to interpret error messages?

Recommended Posts

I've been running into error messages that I don't really know what to do with. For instance, I added the Urban Patrol System script to a mission of mine and now get the following error when I launch the mission:

'_this setFeatureType (|#|parseNumber _value)'
Error parsenumber: Type Number, expected Bool,String
Number,Object,Side,Group,Text,Config entry, Display (dialog), Control,Network
Object,Team member,Task,Location

Now, if I understand the message correctly, the offender is the part of the script between '...', and the problem is that parseNumber returns a number, but the command expects one of the other types - although according to https://community.bistudio.com/wiki/setFeatureTypesetFeatureType requires a number in that position.

 

What do I do with an error like this?

 

And, more generally: Is there a good resource on error messages and how they need to be read?

Share this post


Link to post
Share on other sites

You'll have to do some basic troubleshooting to identify the exact cause of the error. Backup your mission and work backwards until you find what is causing the error.

 

For example, do you still get the error having removed all groups using the UPS script in your mission? If not try re-adding it to just one group.

 

Hopefully you'll still get no errors at this point which would indicate you've made a typo in one of the init calls in the other groups, if you do still get the error the issue may not even be related to UPS.

 

When you're starting out, always make small changes and test often to ensure they work before continuing - If you hit a problem you won't have to go back searching too far to find out what you did to cause it (and most of the time it is user error).

  • Like 1

Share this post


Link to post
Share on other sites

I don't see setFeatureType used anywhere in UPS - are you sure it's not some other script?

 

The error here is obvious though. Parsenumber expects string but got a number instead. So take a look how _value gets its value.

Simply removing parsenumber would be enough to fix this particular error, but it might some other one if the scripts handles it as a string somewhere else.

 

  • Like 1

Share this post


Link to post
Share on other sites

I'll have to check if it isn't some other script. I haven't added any others, but I am working with a mission framework, so perhaps that is the culprit or some interaction of different things. Will check. Thanks!

Share this post


Link to post
Share on other sites

Ah... looks like the culprit does indeed lie elsewhere. My apologies in the direction of Kronzky!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×