If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Splitting\appending arrays with ruby
3 posts
• Page 1 of 1
Splitting\appending arrays with ruby
This topic started in other post and has been answered by @tulamide, but since I had no luck to write the code correctly, I would love if you ruby gurus please tell me whats wrong. Uploaded a simple schematic that partly works, so all is needed here is a little fix so the whole forum (even the bad coders, like me) would enjoys those must have features.
As you would see, my "split" code cuts the array from the end, not from the beginning, as the green does, so I used simple math to fix it, but I'm sure the whole thing can be done simply in ruby itself.
My "append" code shows an error (although tulamide mentioned that there is no meaning to the array's type, so why?)
As you would see, my "split" code cuts the array from the end, not from the beginning, as the green does, so I used simple math to fix it, but I'm sure the whole thing can be done simply in ruby itself.
My "append" code shows an error (although tulamide mentioned that there is no meaning to the array's type, so why?)
- Attachments
-
- (split and append arrays).fsm
- (772 Bytes) Downloaded 834 times
-
kortezzzz - Posts: 763
- Joined: Tue Mar 19, 2013 4:21 pm
Re: Splitting\appending arrays with ruby
Read the error message. You're trying to convert nil to a string. Nil means, there is no object, and I hope you'll agree that you can't convert a big hole of nothing into a string
- Attachments
-
- (split and append arrays)[tula].fsm
- (625 Bytes) Downloaded 879 times
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: Splitting\appending arrays with ruby
Thanks for the fix, tulamide. the concepts now work
-
kortezzzz - Posts: 763
- Joined: Tue Mar 19, 2013 4:21 pm
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 36 guests