Error: #5 Invalid Procedure call or argument

Mike Simpson's invaluable tool with many helper functions to make your life easier with RailWorks. Based on the extremely popular RS Tools and also from the same author as Route Riter for MSTS.

Moderator: Moderators

Locked
User avatar
peterfhayes
Very Active Forum Member
Posts: 1962
Joined: Mon Sep 26, 2011 5:07 am

Error: #5 Invalid Procedure call or argument

Post by peterfhayes »

Hi Mike
I know that this error has been discussed before but has it been solved.

When editing Workshop Scenarios you get this error:
Error: #5 Invalid Procedure call or argument
Module: frmKickStart
Procedure: PutDetail
Pressing the "Enter" key several times clears it sometimes with a "weather" error message, and you get into the editor.
However, trying to save any mods again triggers the ERROR #5 message, and nothing is saved.

IN TS2017 there is an app called NameMyRoute
and when you highlight the route and the WS scenario you see this "error" message:
[Scenario GUID reading ScenarioProperties.xml failed – ‘.’, hexadecimal value 0x00, is an invalid character. Line xx, position xx]
Where Line xx and Position xx have different values/route/scenario

Very often these same WS scenarios will cause TS2017 to crash to a dmp file (not always).

An example for you perhaps to try:
WS Scenario: Northbound EMU Delivery, Route: WCML Trent Valley
Any ideas?

PeterH
(40 degrees C most days this week).
gptech
Very Active Forum Member
Posts: 18348
Joined: Fri Oct 10, 2008 5:48 pm
Location: Wakefield, West Yorkshire

Re: Error: #5 Invalid Procedure call or argument

Post by gptech »

peterfhayes wrote:An example for you perhaps to try:
WS Scenario: Northbound EMU Delivery, Route: WCML Trent Valley
No problems here with it Peter, but I don't allow Steam to install Workshop items--renaming the Routes folder to RoutesX causes Steam to believe I don't have the requisites so all it does is download things in .zip archives to ..\Steam\steamapps\workshop\content\24010. All I then do is manually extract the goodies.

Might be something for you to try?
peterfhayes wrote:when you highlight the route and the WS scenario you see this "error" message:
[Scenario GUID reading ScenarioProperties.xml failed – ‘.’, hexadecimal value 0x00, is an invalid character. Line xx, position xx]
Have you tried opening that ScenarioProperties.xml file with RW Tools?
User avatar
peterfhayes
Very Active Forum Member
Posts: 1962
Joined: Mon Sep 26, 2011 5:07 am

Re: Error: #5 Invalid Procedure call or argument

Post by peterfhayes »

Gary
Thanks for the info.
You are a genius!!!! :D
Opening the zip files manually (using the RouteX trick) removes the #5 /weather error when opening in RW-Tools and the "hexadecimal" error when opening in namemyroutes.exe.
From now on all WS scenarios will be extracted manually - I've had issues previously with WS scenarios, where the zip file stayed in the 20410 folder ie did not extract itself.
Many thanks for yet another useful tip.
pH
User avatar
mikesimpson
Very Active Forum Member
Posts: 6275
Joined: Mon Dec 03, 2001 12:00 am
Location: Southern Hemisphere Penal Colonies
Contact:

Re: Error: #5 Invalid Procedure call or argument

Post by mikesimpson »

Hi Gary,

Thanks for that tip, I had an email from a user in Germany this week with exactly the same error and had no idea what the answer was.

Mike
Mike in OZ - Author of TS-Tools & Route-Riter.
http://www.agenetools.com
I'm not arguing (just explaining why I'm right).
User avatar
peterfhayes
Very Active Forum Member
Posts: 1962
Joined: Mon Sep 26, 2011 5:07 am

Re: Error: #5 Invalid Procedure call or argument

Post by peterfhayes »

Gary
One thought - how do you identify the WS scenarios (as they are no longer coloured "blue" in RW-Tools) when you want to delete them.
Especially after a few sleeps or a couple of nights on Tadcaster Wallop, when memory is slightly vague.
pH.
User avatar
mikesimpson
Very Active Forum Member
Posts: 6275
Joined: Mon Dec 03, 2001 12:00 am
Location: Southern Hemisphere Penal Colonies
Contact:

Re: Error: #5 Invalid Procedure call or argument

Post by mikesimpson »

peterfhayes wrote:Gary
One thought - how do you identify the WS scenarios (as they are no longer coloured "blue" in RW-Tools) when you want to delete them.
Especially after a few sleeps or a couple of nights on Tadcaster Wallop, when memory is slightly vague.
pH.
Hi Peter,

Workshop scenarios should be coloured light blue in RW_Tools, I have not changed that? You can check if a scenario is a Workshop one by looking at the ScenarioProperties.xml for the scenario. Near the end may be a line <WorkshopID , if this entry is greater than zero then it is a workshop scenario.

Mike
Mike in OZ - Author of TS-Tools & Route-Riter.
http://www.agenetools.com
I'm not arguing (just explaining why I'm right).
User avatar
peterfhayes
Very Active Forum Member
Posts: 1962
Joined: Mon Sep 26, 2011 5:07 am

Re: Error: #5 Invalid Procedure call or argument

Post by peterfhayes »

Mike
I may not have explained that well.
When you install the WS scenarios manually as per Gary's instructions above, they do NOT now appear as WS scenarios (coloured blue) in RW_Tools but just a "standard" scenarios.
So there is not an easy way to identify them as WS scenarios any more.
Searching for workshopid in scenarioproperties.xmk in these manually installed scenarios does gives a workshopid a value of "0"
Regards
pH
gptech
Very Active Forum Member
Posts: 18348
Joined: Fri Oct 10, 2008 5:48 pm
Location: Wakefield, West Yorkshire

Re: Error: #5 Invalid Procedure call or argument

Post by gptech »

I've never been bothered by them being the *wrong* colour; a scenario's a scenario as far as I'm concerned. I suppose adding [WS] in the name field of the ScenarioProperties.xml file would do the job nicely. Of course it begs the question , "why do you need to know it's a Workshop scenario?"
If it's only to be able to delete them once you've had enough of them just do so as you'd delete any other scenario---you know the name, so just select them in the game's editor or RW Tools and press the 'Delete' button.
I forgot to say that once installed you can just unsubscribe from them without the game removing them, or downloading them again. It would seem that the auto installation of them adds the Workshop identification so without that routine running they're seen by the game and RW Tools as 'any old scenario'----would be interesting to see how a career scenario from the Workshop is seen using this method.
User avatar
peterfhayes
Very Active Forum Member
Posts: 1962
Joined: Mon Sep 26, 2011 5:07 am

Re: Error: #5 Invalid Procedure call or argument

Post by peterfhayes »

Gary
I didn't explain that well either - I rarely keep any WS scenario, if I did I would have over 2,000 by now. :D
Once played I just delete them.
I guess I was looking for an easy way to do it.
I have it covered now.
WS career scenarios installed manually (one only so far) showed as a standard scenario in RWTools and retained the timings, etc in TS2017.
Thanks
pH
Locked

Return to “[TS] RW Tools”