Inscrit le: 30 Jan 2009 Messages: 669 Sujets: 56 Spécialité en worldedit: Faire des bug Médailles: 1 (En savoir plus...)
Posté le: 25/02/10 19:22 Sujet du message: Variables locales non supprimées
Bonjour à tous !
J'ai un petit problème, quand je passe ce déclencheur au leak detector, il me dit que beaucoup de variables locales ne sont pas supprimées. Or je ne vois pas comment faire ^^
Gui:
Trigger:
Create Green Red
Evénements
Temps - Every 5.00 seconds of game time
Conditions
Actions
Destructible - Pick every destructible in Red Green Vue <gen> and do (Actions)
Boucle - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si - Conditions
(Destructible-type of (Picked destructible)) Egal à Green Wood
Alors - Actions
Destructible - Remove (Picked destructible) Set tempPoint1 = (Center of Région 189 Copier <gen>) Destructible - Create a Red Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 <gen>) Destructible - Create a Red Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 3 <gen>) Destructible - Create a Red Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 2 <gen>) Destructible - Create a Red Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 5 <gen>) Destructible - Create a Red Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 4 <gen>) Destructible - Create a Red Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 7 <gen>) Destructible - Create a Red Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 6 <gen>) Destructible - Create a Red Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 9 <gen>) Destructible - Create a Red Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 8 <gen>) Destructible - Create a Red Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 11 <gen>) Destructible - Create a Red Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 10 <gen>) Destructible - Create a Red Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1)
Sinon - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si - Conditions
(Destructible-type of (Picked destructible)) Egal à Red Wood
Alors - Actions
Destructible - Remove (Picked destructible) Set tempPoint1 = (Center of Région 189 <gen>) Destructible - Create a Green Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier <gen>) Destructible - Create a Green Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 2 <gen>) Destructible - Create a Green Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 3 <gen>) Destructible - Create a Green Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 4 <gen>) Destructible - Create a Green Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 5 <gen>) Destructible - Create a Green Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 6 <gen>) Destructible - Create a Green Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 7 <gen>) Destructible - Create a Green Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 8 <gen>) Destructible - Create a Green Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 9 <gen>) Destructible - Create a Green Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 10 <gen>) Destructible - Create a Green Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 11 <gen>) Destructible - Create a Green Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1)
Inscrit le: 23 Aoû 2007 Messages: 7143 Sujets: 147 Spécialité en worldedit: le troll, le flood, la vulgarité, mon coeur balance Médailles: 2 (En savoir plus...)
Posté le: 26/02/10 21:05 Sujet du message:
Wilfried a écrit:
Déjà utilise des déploiement et fait agir tes Custom script à la fin de tes déclencheurs.
Et en quoi les variables déployées seraient utiles ici, quand aux custom scripts on peut les placer n'importe où dans le déclencheur, et de préférence où c'est nécessaire.
Enfin, tu n'as aucune variable locale.
Après chaque RemoveLocation rajoute ce custom script
Inscrit le: 23 Aoû 2007 Messages: 7143 Sujets: 147 Spécialité en worldedit: le troll, le flood, la vulgarité, mon coeur balance Médailles: 2 (En savoir plus...)
Posté le: 26/02/10 21:45 Sujet du message:
profet a écrit:
Il est juste nécessaire de le rajouter à la fin de la liste d'actions.
Autant s'affranchir du leak mineur quand un handle est détruit et que la variable qui pointait encore dessus n'est pas nullifiée mais pointe sur un nouveau handle.
Perso je le fais
Brissou de Mourièssou Créateur de sorts, depuis 1936.
Inscrit le: 30 Aoû 2007 Messages: 1510 Sujets: 26 Spécialité en worldedit: Développer des jeux vidéos pour le fun, donc world edit c'est comme faire une addition. Médailles: 2 (En savoir plus...)
Posté le: 26/02/10 22:56 Sujet du message:
Serais-tu aussi maniac irl ? j'aimerais bien voir ton appart. _________________
Inscrit le: 23 Aoû 2007 Messages: 7143 Sujets: 147 Spécialité en worldedit: le troll, le flood, la vulgarité, mon coeur balance Médailles: 2 (En savoir plus...)
Posté le: 27/02/10 10:16 Sujet du message:
Brissou de Mourièssou a écrit:
Serais-tu aussi maniac irl ? j'aimerais bien voir ton appart.
Nan je suis très bordélique au contraire, au point qu'il m'arrive régulièrement d'égarer des objets uber importants pendant quelque jours. _________________
Inscrit le: 30 Jan 2009 Messages: 669 Sujets: 56 Spécialité en worldedit: Faire des bug Médailles: 1 (En savoir plus...)
Posté le: 27/02/10 12:16 Sujet du message:
Merci Troll.
Et je préfère prendre toute les précautions nécessaires car en fait, à cette partie, au bout de 15 secondes environ, je constate un freeze de l'écran. Donc je fais des tests pour savoir ce qui provoque ça et je ne pas laisser le place à l'inconnu.
Je vous dit si ça fonctionne mieux ! _________________
Inscrit le: 23 Aoû 2007 Messages: 7143 Sujets: 147 Spécialité en worldedit: le troll, le flood, la vulgarité, mon coeur balance Médailles: 2 (En savoir plus...)
Posté le: 27/02/10 13:08 Sujet du message:
Nerzulll a écrit:
Merci Troll.
Et je préfère prendre toute les précautions nécessaires car en fait, à cette partie, au bout de 15 secondes environ, je constate un freeze de l'écran. Donc je fais des tests pour savoir ce qui provoque ça et je ne pas laisser le place à l'inconnu.
Je vous dit si ça fonctionne mieux !
Euh, c'est sûr et certain que ca ne vient pas de cela (de ce trigger du moins) ^^
Cherche plutôt dans les faibles périodiques, ou dans les boucles( for each integer ...) _________________
Inscrit le: 13 Oct 2007 Messages: 994 Sujets: 25 Spécialité en worldedit: Codeur
Posté le: 27/02/10 13:50 Sujet du message:
Arriver à créer des freezes avec des memory leaks en 15 secondes :/
Tu dois avoir une sacré usine à gaz qsi c'est vraiment le cas. _________________
- La théorie c'est quand rien ne fonctionne mais tout le monde sait pourquoi.
- La pratique c'est quand tout fonctionne mais personne ne sait pourquoi.
- Chez moi la théorie et la pratique sont réunies, rien ne fonctionne et personne ne sait pourquoi.
Inscrit le: 30 Jan 2009 Messages: 669 Sujets: 56 Spécialité en worldedit: Faire des bug Médailles: 1 (En savoir plus...)
Posté le: 27/02/10 20:39 Sujet du message:
Bon, voila tout les déclencheurs qui pourrait créer ce freeze !
Secret:
Gui:
Trigger:
Arrive
Evénements
Unité - A unit enters Revive4 Bis <gen>
Conditions
Actions
For each (Integer A) from 1 to 8, do (Visibilité - Create an initially Activé visibility modifier for (Player((Integer A))) emitting Visibilité across Vue 4bis <gen>) Déclencheur - Turn on Create Green Red <gen>
Secret:
Gui:
Trigger:
Create Green Red
Evénements
Temps - Every 5.00 seconds of game time
Conditions
Actions
Destructible - Pick every destructible in Red Green Vue <gen> and do (Actions)
Boucle - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si - Conditions
(Destructible-type of (Picked destructible)) Egal à Green Wood
Alors - Actions
Destructible - Remove (Picked destructible) Set tempPoint1 = (Center of Région 189 Copier <gen>) Destructible - Create a Red Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 <gen>) Destructible - Create a Red Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 3 <gen>) Destructible - Create a Red Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 2 <gen>) Destructible - Create a Red Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 5 <gen>) Destructible - Create a Red Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 4 <gen>) Destructible - Create a Red Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 7 <gen>) Destructible - Create a Red Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 6 <gen>) Destructible - Create a Red Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 9 <gen>) Destructible - Create a Red Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 8 <gen>) Destructible - Create a Red Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 11 <gen>) Destructible - Create a Red Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 10 <gen>) Destructible - Create a Red Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1)
Sinon - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si - Conditions
(Destructible-type of (Picked destructible)) Egal à Red Wood
Alors - Actions
Destructible - Remove (Picked destructible) Set tempPoint1 = (Center of Région 189 <gen>) Destructible - Create a Green Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier <gen>) Destructible - Create a Green Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 2 <gen>) Destructible - Create a Green Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 3 <gen>) Destructible - Create a Green Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 4 <gen>) Destructible - Create a Green Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 5 <gen>) Destructible - Create a Green Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 6 <gen>) Destructible - Create a Green Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 7 <gen>) Destructible - Create a Green Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 8 <gen>) Destructible - Create a Green Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 9 <gen>) Destructible - Create a Green Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 10 <gen>) Destructible - Create a Green Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1) Set tempPoint1 = (Center of Région 189 Copier 11 <gen>) Destructible - Create a Green Wood at tempPoint1 facing (Random angle) with scale 1.00 and variation 0 Custom script: call RemoveLocation(udg_tempPoint1)
Sinon - Actions
Do nothing
Secret:
Gui:
Trigger:
Players enter
Evénements
Unité - A unit enters Red Green Vue <gen>
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si - Conditions
(Triggering unit) Egal à Soul 0008 <gen>
Alors - Actions
Déclencheur - Turn on Red <gen>
Sinon - Actions
Secret:
Gui:
Trigger:
Players end
Evénements
Unité - A unit leaves Red Green Vue <gen>
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si - Conditions
(Triggering unit) Egal à Soul 0008 <gen>
Alors - Actions
Déclencheur - Turn off Red <gen>
Sinon - Actions
Secret:
Gui:
Trigger:
Red
Evénements
Temps - Every 0.05 seconds of game time
Conditions
(Destructible-type of (Random destructible in Red Green Vue <gen>)) Egal à Red Wood
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si - Conditions
(Issued order) Différent de (Order(stand))
Alors - Actions
Unité - Kill Soul 0008 <gen>
Sinon - Actions
Partie - Display to (All players) the text: Bouh !
Je sais que vous n'aimez pas les spoilers, mais là, je les juge plus que nécessaire.
Inscrit le: 23 Aoû 2007 Messages: 7143 Sujets: 147 Spécialité en worldedit: le troll, le flood, la vulgarité, mon coeur balance Médailles: 2 (En savoir plus...)
Posté le: 27/02/10 21:08 Sujet du message:
Gui:
Trigger:
(Destructible-type of (Random destructible in Red Green Vue <gen>)) Egal à Red Wood
est une sacré usine à gaz, mais de là à freez un écran au bout de 15 min hmm ...
En tous cas il ne semble y avoir aucun leak.
A moins que des destructibles ne soient créés pendant ces 15 min de jeu dans la "région" Red Green Vue, ou tout simplement déjà placés sur la map ?
EDIT :
Tu tentes de tuer cette pauvre unité toutes les 0.05 secondes ...
Tu te rends compte que ton if ne sert à rien quand le timer 0.05 expire ? _________________
Vous ne pouvez pas poster de nouveaux sujets dans ce forum Vous ne pouvez pas répondre aux sujets dans ce forum Vous ne pouvez pas éditer vos messages dans ce forum Vous ne pouvez pas supprimer vos messages dans ce forum Vous ne pouvez pas voter dans les sondages de ce forum