Bonjour à tous,
Vu que je ne parviens pas à faire une procédure qui se termine sans arrêter le script et qui veuille bien retourner à la ligne d'où elle a été appelée. J'ai codé le comportement d'un processus avec des Aller à, des variables pour connaître la position de l'appel.
Seulement voilà, les boucles qui se font à la suite de l'endroit où ma "procédure" a été appelée perdent un tour...
J'ai donc tenté de faire une variable en guise de valeur pour le nombre de bouclages et d'incrémenter celle-ci avec un simples "var = var+1;" mais cela ne fonctionne pas. Alors que j'ai tenté sur un petit script à côté et ça fonctionne...
Ci-joint le fichier code et un screen d'une incrémentation, cela est-il valide ? Pensez-vous qu'il faille mettre des parenthèses autour de boucleCroton1 à cause du chiffre 1 ?
Je m'en remets à vous.
Discord : TheMalnyr#7348
Variable boucle qui ne s'incrémente pas
Variable boucle qui ne s'incrémente pas
- Attachments
-
- Incrément variable
- Capture.PNG (20.1 KiB) Viewed 1036 times
-
- PlantesScriptSansProcedure.ascr
- Fichier récolte Wakfu sans procédure
- (360.38 KiB) Downloaded 78 times
Re: Variable boucle qui ne s'incrémente pas
That is quite a long script.
I am sure that it can be made much more compact and easier to change/test.
I might find time to post an example.
Regarding the unsolved problem with procedure call
I have an idea on how to emulate
procedure calls using python script (through Command object).
But it will take some time before I post it.
python3 procedure.py [procedure-name]
Meanwhile your var increment I would approach
as in attached test script.
I am sure that it can be made much more compact and easier to change/test.
I might find time to post an example.
Regarding the unsolved problem with procedure call
I have an idea on how to emulate
procedure calls using python script (through Command object).
But it will take some time before I post it.
python3 procedure.py [procedure-name]
Meanwhile your var increment I would approach
as in attached test script.
- Attachments
-
- var-increment.ascr
- (2.75 KiB) Downloaded 102 times
Re: Variable boucle qui ne s'incrémente pas
Hello, first thank you for taking time to help me.
I also think it can be more compact.
I tried your example or var increment and console command doesn't work for me so I put an Dialog Box instead and it works fine. I didn't think of using just Code to increment my variables. I am gonna test it right away.
I'll wait for your feedback.
I also think it can be more compact.
I tried your example or var increment and console command doesn't work for me so I put an Dialog Box instead and it works fine. I didn't think of using just Code to increment my variables. I am gonna test it right away.
I'll wait for your feedback.
Re: Variable boucle qui ne s'incrémente pas
Bonjour,
Incrémentation (++var et var++) et Décrémentation (--var et var--).
Tout est dans le script en PJ.
Bien lire dans la console.
Cordialement.
MDLE46
Incrémentation (++var et var++) et Décrémentation (--var et var--).
Tout est dans le script en PJ.
Bien lire dans la console.
Cordialement.
MDLE46
- Attachments
-
- Incrémentation_Décrémentation.ascr
- (18.48 KiB) Downloaded 115 times