"Held By Character" Error

This forum is the place to learn about and discuss ADRIFT 5. Feel free to mention any bugs you find here, but please also add these to the Bugs & Enhancements list.

Please also refer to the ADRIFT 5 Wiki for more information.
Post Reply
jdh6955
Posts: 1
Joined: Fri Oct 16, 2020 7:10 pm
Points: 10

"Held By Character" Error

Post by jdh6955 »

Hello,

I am new to Adrift - I have had to restart a project twice now due to this bug.

I created a project, saved, closed, then came back to it. An item I created was being held by a character by default. I return to the file and I keep getting this error - "Error Setting Property Location of the object to 'Held By Character': 'Held By Character' is not a valid state." This spoiler is the error message it gives.
Spoiler
at ADRIFT.frmError..ctor(String sErrorMessage, Exception ex)
at ADRIFT.SharedModule.ErrMsg(String sMessage, Exception ex)
at ADRIFT.clsProperty.set_Value(Boolean bTesting, String Value)
at ADRIFT.frmObject.cmbInitialLocation_SelectionChanged(Object sender, EventArgs e)
at Infragistics.Win.UltraWinEditors.UltraComboEditor.FireSelectionChanged(EventArgs e)
at Infragistics.Win.UltraWinEditors.UltraComboEditor.OnSelectionChanged(EventArgs args)
at Infragistics.Win.EmbeddableEditorBase.RaiseSelectionChangedEvent()
at Infragistics.Win.EditorWithCombo.Infragistics.Win.IValueListOwner.OnSelectedItemChanged()
at Infragistics.Win.ValueList.ProcessSelectedIndexChanged(Int32 selectedIndex, Boolean commit, Boolean forceOwnerUpdate)
at Infragistics.Win.ValueListDropDown.SetSelectedIndexHelper(Int32 value, Boolean bringIntoView)
at Infragistics.Win.ValueListDropDown.SelectItemByMouse(ValueListItem valueListItem)
at Infragistics.Win.ValueListDropDown.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
at Infragistics.Win.UIAutomation.UiaProviderControlNativeWindow.WndProc(Message& msg)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at ADRIFT.frmGenerator.Main()
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at R.P.Main(String[] args)

Once this error starts appearing, I can not create objects that are held by a character or worn by a character. If I save that file and run the game, if I open the character's inventory, that same error appears and crashes the game.

Basically, I am at a point where I can not use the program and I have lost a LOT of work.

If anyone has any suggestions, please let me know.
User avatar
Denk
Posts: 969
Joined: Mon Feb 22, 2016 6:21 pm
Points: 346
Location: Hjørring, Denmark

Re: "Held By Character" Error

Post by Denk »

Welcome jdh6955

Sorry to hear you are having troubles. I haven't experienced what you are experiencing, but perhaps we can figure out what is causing it anyway.

Which libraries have you chosen under Setings->Libraries?
Please provide both path and file-name.

Also, just to be sure, exactly which version are you using?
(the newest one is 5.0.36.4)

EDIT: Can you provoke the error in a small demo? Then you can attach the taf-file to your post. That would help us a lot to reproduce the error.
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
bn2dave@gmail.com
Posts: 2
Joined: Mon Jul 26, 2021 12:21 am

Re: "Held By Character" Error

Post by bn2dave@gmail.com »

I have just spent 4 hours creating an outline of a game and am having the same error

the message is:

Error setting property location of the object to "Held by Character" : 'Held by Character' is not a valid state

Help please!!!
User avatar
Lazzah
Moderator
Posts: 2515
Joined: Thu Mar 31, 2011 5:54 am
Points: 100
Location: Clacton-on-Sea, Essex
Contact:

Re: "Held By Character" Error

Post by Lazzah »

I have never come across this bug, but obviously it is a problem for you.

A possible workaround would be to have any objects that are initially "held by character" or "worn by character" as "Hidden". You then create a system task, set to start Immediately, in which there are no restrictions, only the actions which move the objects to be held (or worn) by the characters that you want them held/worn by, e.g. MOVE OBJECT "a tennis ball" TO HELD BY CHARACTER "Andy Murray", etc. Make sure the 'Task is Repeatable' box on the system task is unticked.

Hopefully this should solve the problem.
Visit "Larry's ADRIFT Text Adventures" at http://LarrysAdriftTextAdventures.co.uk
User avatar
Denk
Posts: 969
Joined: Mon Feb 22, 2016 6:21 pm
Points: 346
Location: Hjørring, Denmark

Re: "Held By Character" Error

Post by Denk »

bn2dave@gmail.com wrote: Mon Jul 26, 2021 12:40 amI have just spent 4 hours creating an outline of a game and am having the same errorthe message is:Error setting property location of the object to "Held by Character" : 'Held by Character' is not a valid stateHelp please!!!
Last year a user had a similar problem as can be seen at the top of this thread, but those of us who have been using ADRIFT for a long time haven't experienced it. So I am wondering if it has to do with libraries. I hope you will help us figure out what is wrong, then I believe ADRIFT will work very well for you after that. Until then, I would stop working on your game.

However, it would be very useful if you could reproduce the bug in a taf-file and attach it to the post.

I also have some questions:
1. If you simply start on a new game, create a character first, then a dynamic object which is held by that character, does the problem then occur?
2. If you save this small test, and then reload it, does the problem occur?

If the problem occurs, please save it again and attach the resulting taf-file to a post in this thread. Then we can look at the file to see what is wrong.

If you cannot reproduce the bug in a small test, it would help if you could e-mail your game with the bug to me, but understandable if you don't want that.

In any case, it would be good if you could attach a screenshot of the libraries you are using (found under Settings->Libraries)
Thanks
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
bn2dave@gmail.com
Posts: 2
Joined: Mon Jul 26, 2021 12:21 am

Re: "Held By Character" Error

Post by bn2dave@gmail.com »

Thanks for reply....Will give this a go after holidays!

Cheers
Post Reply