Author Topic: Frequently Asked Questions  (Read 2606 times)

0 Members and 1 Guest are viewing this topic.

Jean

  • Administrator
  • Hero Member
  • *****
  • Posts: 1218
    • View Profile
Frequently Asked Questions
« on: August 05, 2020, 11:16:13 PM »

Tip: See Options General - Edit application on error. When your scripts makes an error this option will open the editor with the script on the line of the error.

Tip: In c:\planetdance\pd.ini under [main] add this:
devprog=1

This will make 2 extra menu's visible under Application:
Dev prog: runs the last edited script
Cur prog: first you have to assign a hotkey for this one in options - keyboard, then, run some script, take care the script has focus, then press the hotkey to open the source of the script in the program editor. You can make any adjustments and you can immediately run it again from the editor with F9 (or program run).

Frequently asked questions
Q: My program only runs correctly the first time.
A: You probably forgot to reset a loop counter. If you have something like this:

:SomeSubRoutine;
for (i < 10)
   {
   etc.
   }
return;

And you call that subroutine the second time without modifying 'i', it will be10 because that is it's value after executing the loop the first time.
All variables get initialized to 0 when a program begins, that is why you didn't see this the first time.

Q: My variable does not seem to get initialized:
A: It's probably outside reachable code, i.e if you have:

$ initialisations $

run:

:Subroutine;
...
return

int myvariable = 5;

the initialisation to 5 is code to execute, but this code is placed between labels, so it won't get executed.


- I want to write a script, can it be distributed?
Please post some info about your script here.
Greetings from Groningen Netherlands.