Issues with editor

Discussion on the Lua Scripting capabilities for RaceCapture/Pro. Also see the <a href="http://autosportlabs.net/RaceCapturePro_Lua_Scripting">Lua Scripting Guide</a>

Moderators: JeffC, stieg

Post Reply
anastos
Posts: 35
Joined: Fri Apr 14, 2017 4:31 am
Location: Wisconsin

Issues with editor

Post by anastos »

I am not able to get the script editor to work properly.
I can make changes and write to the controller, but the println() function never displays any results in the editor window after polling the log. Also if I copy and paste the log into wordpad the results are in a foreign language Chinese I think. Anyone know how to fix this?
Thanks,
Anastos

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Hi,

Try using a generic editor like Notepad++ for editing your scripts outside of the window.

To see the results of your println() you have to enable 'poll logging' to see the results in the window. You'll also see any errors your script might have.

See this wiki page for more info: https://wiki.autosportlabs.com/RaceCapt ... leshooting

Thanks,
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

anastos
Posts: 35
Joined: Fri Apr 14, 2017 4:31 am
Location: Wisconsin

Post by anastos »

Hi Brent,
I have been checking the poll log box, and have tried all the various options i.e. error, trace, debug etc. I have used the clear screen and rerun buttons, not once have I been able to get println() to work. How could I use a separate program like notepad++ to view the script in action. How do I resolve the foreign language in the log? By the way my application log displays in Chinese also.
Thanks,
Anastos

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Hi-

It could be that you have a bug in your script. Can you paste your script here, or your entire config file as an attachment to a reply?

We also have a beta 1.10.0 app available for testing, which should fix the garbage characters for the copy-to-clipboard issue: viewtopic.php?t=5434
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

anastos
Posts: 35
Joined: Fri Apr 14, 2017 4:31 am
Location: Wisconsin

Post by anastos »

Here is the rcp file as it is being used. I am trying to incorporate additional features like "start logging above 10mph, gear calculations etc." Those features are not in the attached script. I can not get the script to work and when trying to debug I can not get the editor to provide feedback by way of println()
Attachments
BMW 325.txt
(22.89 KiB) Downloaded 84 times
Thanks,
Anastos

anastos
Posts: 35
Joined: Fri Apr 14, 2017 4:31 am
Location: Wisconsin

Post by anastos »

I installed the 1.10 beta on a Windows PC running Windows 7 Home Premium SP1. The program crashes when trying to go to analysis or analog sensors in setup. The dashboard seems to work ok
Thanks,
Anastos

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Hi,

I looked at your script - no where in your script you have any println statements - that's why you're not seeing any messages in the log window below.

An example of seeing a println working is by temporarily replacing your entire script with this simple one:

function onTick()

println("hello")

end

Once you press the "poll log" box then you will see the output in the window.
Attachments
Screenshot from 2017-06-07 07-47-12.png
Screenshot from 2017-06-07 07-47-12.png (67.93 KiB) Viewed 1625 times
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

anastos
Posts: 35
Joined: Fri Apr 14, 2017 4:31 am
Location: Wisconsin

Post by anastos »

Thanks Brent I'll try that. I realize there weren't any println() statements in the script I sent. I removed them when they did not do anything. I was hoping maybe someone might see a problem in what was sent that would explain the foreign language issue or perhaps an issue that would prevent println() function.
Thanks,
Anastos

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Oh, regarding the crashing on the beta app, does that happen repeatedly? Do you see that happening on other computers you try?

If you'd like to post a follow up in the beta testing thread, that would be even better.

Thanks,
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

anastos
Posts: 35
Joined: Fri Apr 14, 2017 4:31 am
Location: Wisconsin

Post by anastos »

Yeah it crashes every time I try to go to analysis. I was going to copy and paste an App log and see if it was in English but I could never get there. Then I tried accessing other areas of the app and it crashed as well. Only in the setup areas, the dashboard seemed fine.
Thanks,
Anastos

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Thanks. Could you report in the beta testing thread so we can track it there?
viewtopic.php?t=5434

We'll be rolling out a 1.10.1 app update shortly which might have a fix that could address your issue.

Thanks!
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Hi anastos,

We released a 1.10.1 app here: viewtopic.php?t=5434

Could you give it a test and report there to indicate if you are still seeing the crash issue?

Thanks,
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

Post Reply