ATTENTION

This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices.


flexsim.com

Go Back   FlexSim Community Forum > FlexSim Healthcare (HC) > FlexSim HC: Q&A
FAQ Downloads Calendar Search Mark Forums Read

FlexSim HC: Q&A Questions about FlexSim Healthcare

Reply
 
Thread Tools Display Modes
  #1  
Old 07-03-2014
Pongjetanapong Pongjetanapong is offline
Flexsim User
 
Join Date: Jul 2013
Posts: 19
Downloads: 5
Uploads: 0
Thanks: 8
Thanked 2 Times in 2 Posts
Rep Power: 81
Pongjetanapong is on a distinguished road
Default User command error

Hi All,

I'm having a problem with the user command function. No matter what I do it just keep giving me this error. Please help!

Flexscript Error MAIN:/project/model/Tools/UserCommands/command3/code line 1 invalid character <.> ascii = 46
Flexscript Error MAIN:/project/model/Tools/UserCommands/command3/code line 1 invalid character <.> ascii = 46
Flexscript Error MAIN:/project/model/Tools/UserCommands/command3/code line 1 syntax error, unexpected '/', expecting end of code
Could not finish parsing because of previous errors.

Thank you
Attached Thumbnails
Click image for larger version

Name:	UsercommandErr.png
Views:	72
Size:	77.6 KB
ID:	2574  
Reply With Quote
  #2  
Old 07-03-2014
Pongjetanapong Pongjetanapong is offline
Flexsim User
 
Join Date: Jul 2013
Posts: 19
Downloads: 5
Uploads: 0
Thanks: 8
Thanked 2 Times in 2 Posts
Rep Power: 81
Pongjetanapong is on a distinguished road
Default

And every time I open the code window. I get "../thepicklist" on my first line. I don't know if that is related to the error I'm getting
Reply With Quote
  #3  
Old 07-03-2014
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 638
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Default

We got a similar error whenever we copied a code from a PDF file directly to the source code editor. It exists in the character space more characters, which look identical but are described by different binaries.

If you write the source code yourself in the code editor, the error may vanish.
Otherwise check your language settings in the system. Test if you could change to the English set of the system.

Jörg
Reply With Quote
The Following User Says Thank You to Jörg Vogel For This Useful Post:
Pongjetanapong (07-06-2014)
  #4  
Old 07-03-2014
sagar bolisetti's Avatar
sagar bolisetti sagar bolisetti is offline
Flexsim User
 
Join Date: Aug 2013
Location: Hyderabad,India
Posts: 160
Downloads: 145
Uploads: 0
Thanks: 124
Thanked 99 Times in 63 Posts
Rep Power: 146
sagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the rough
Default

Hello Pongjetanapong

It seems you have directly copied the code from any one of the object triggers in the model.Triggers that have a return a value need to have a return value.Example process time field return a process time and setup field returns a setup time.But user command is not like that you have to specify your own parameters that can be passed into a user command.The return value and parameter list are just used by the Flexscript parser to give you warnings if you are not defined them.In you case you have some special characters that was not defined i.e / and about "." i didnt see this character in your window may be that was the problem Jorg defined.If you are not using the special character in your script window than dont write it.

For any reasons if you want to use special characters ex: concatenate you can use the escape character '\' to prefix a quotation mark (and other special characters) and therefore adds it your string

string str="/\.";

assigns the two characters /. to the string str.

Edit:

Okay.The above description is only used in the context of flexscript.To conform I have just read in the manual that Flexscript parser does not read the text line part of the code.I dont know why this happens in your case.May be you have copied from different source and i hope jorg suggestion should work for you.

Last edited by sagar bolisetti; 07-04-2014 at 11:53 AM.
Reply With Quote
The Following 2 Users Say Thank You to sagar bolisetti For This Useful Post:
Jörg Vogel (07-03-2014), Pongjetanapong (07-06-2014)
  #5  
Old 07-06-2014
Pongjetanapong Pongjetanapong is offline
Flexsim User
 
Join Date: Jul 2013
Posts: 19
Downloads: 5
Uploads: 0
Thanks: 8
Thanked 2 Times in 2 Posts
Rep Power: 81
Pongjetanapong is on a distinguished road
Default

Hi Jörg

I typed the command myself and already checked my language setting but still get the same error. My Flexsim is still at version 4.02 so I will try to update the software and see what happens. Thank you for your help
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Command Reference not visible in User Manual David Chan Q&A 0 04-30-2013 12:59 AM
How to write a User Command ? mearjun Flexsim Student Forum 7 12-08-2012 11:44 AM
findInCode User Command Jason Lightfoot User Development 19 05-21-2012 02:16 PM
Modified User Command Gui Esther Bennett Q&A 1 01-06-2010 03:55 AM
Dynamic script generation: Good Example with a User Command Naresh Yamani Tips and Tricks 2 05-16-2008 06:54 PM


All times are GMT -6. The time now is 12:30 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.