Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Reply
 
Thread Tools Display Modes
Old 08-26-2022, 08:48 AM   #1
jack461
Human being with feelings
 
jack461's Avatar
 
Join Date: Nov 2013
Location: France
Posts: 177
Default [v6.66/JSFX/Mac] strcpy doesn't copy #dbg_desc (FIXED)

I am trying to save "#dbg_desc" before modifying it, but it seems not to work.
In the attached code, I copy "#dbg_desc" in an auxiliary string, but after the operation, the string is empty
(I have tried with strcat too).
Code:
desc:JJ-Test-JSFX-01

slider1:0<-10,10,1>A slider

@init

#dbg_desc_save = "";
strcpy(#dbg_desc_save,#dbg_desc); // doesn't seem to work ?

@slider
val = slider1;
val >= 5 ? strcpy(#dbg_desc,"A new hope !"); // this works
val <= -5 ? strcpy(#dbg_desc,#dbg_desc_save); // this works
Before moving the slider, one can observe in the debugger that #dbg_desc has its correct initial value, the name of the plug-in.

Is there something I am doing wrong ?

Regards.

J. Jack.
jack461 is offline   Reply With Quote
Old 08-28-2022, 06:59 AM   #2
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,346
Default

ah yeah it is write-only at the moment. fixing. for now write to a separate string as a workaround?
Justin is offline   Reply With Quote
Old 08-30-2022, 01:10 AM   #3
jack461
Human being with feelings
 
jack461's Avatar
 
Join Date: Nov 2013
Location: France
Posts: 177
Default

Thanks, Justin.
No problem, since the real interest of this feature is to convey a message to the user.
All the best.
J. Jack.
jack461 is offline   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 Off

Forum Jump


All times are GMT -7. The time now is 01:16 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.