<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vincenzo</id>
	<title>Multi Theft Auto: Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vincenzo"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Vincenzo"/>
	<updated>2026-05-03T02:51:23Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=FR/Debugage&amp;diff=35472</id>
		<title>FR/Debugage</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=FR/Debugage&amp;diff=35472"/>
		<updated>2013-04-18T15:57:25Z</updated>

		<summary type="html">&lt;p&gt;Vincenzo: /* Debugging Performance Issues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Quand vous scriptez vous pouvez passer à côté de certaines erreurs qui ne sont pas apparentes au premier coup d’œil. Cette page va essayer de vous indiquer quelques démarches à suivre pour localiser les erreurs.&lt;br /&gt;
&lt;br /&gt;
==Console de Débogage==&lt;br /&gt;
MTA a pour caractéristique de posséder une console de débogage qui comme son nom l'indique vous permet de déceler les erreurs dans les fonctions et scripts. Vous pouvez l'ouvrir en tapant ''debugscript x'' dans la console, ici ''x'' est le niveau de débogage:&lt;br /&gt;
* '''1:''' seulement les erreurs&lt;br /&gt;
* '''2:''' erreurs et warnings&lt;br /&gt;
* '''3:''' erreurs, warnings et messages d'informations&lt;br /&gt;
Ainsi, en tapant ''debugscript 3'' tout les messages seront visibles, cependant le niveau 2 est recommandé la plupart du temps pour le débogage. Quand vous testez vos scripts vous devez avoir le ''debugscript'' à disposition  , cela vous permettra de détecter facilement les fautes d'orthographes dans les fonctions ou toutes autres erreurs aussi simple.&lt;br /&gt;
&lt;br /&gt;
===Exemple===&lt;br /&gt;
L'exemple ci-dessous contient deux erreurs:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
if (getPlayerName(player) == &amp;quot;Fedor&amp;quot;)&lt;br /&gt;
	outputChatbox(&amp;quot;Hello Fedor&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Quand ce bout de code va être chargé, debugscript va vous renvoyer à peu près ceci:&lt;br /&gt;
{{Debug info|Loading script failed: C:\&amp;lt;server path&amp;gt;\mods\deathmatch\resources\myResource\script.lua:15: 'then' expected near ´outputChatbox'}}&lt;br /&gt;
Cela signifie que le code ne peut-être analysé/traité, car il y a une erreur de syntaxe. On vous montre le répertoire où se trouve le fichier, vous pouvez donc voir dans quelle ressource ce dernier se trouve ('myResource' dans notre cas) et bien sûr on vous donne le nom du fichier en question. Après le nom du fichier, on a le numéro de la ligne et encore après l'erreur/problème en question. C'est bien plus facile à résoudre maintenant, il manque juste 'then':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
if (getPlayerName(player) == &amp;quot;Fedor&amp;quot;) then&lt;br /&gt;
	outputChatbox(&amp;quot;Hello Fedor&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
A présent le bout de code se charge et ne renvoie aucune erreur, jusqu'à ce qu'un joueur avec le pseudo 'Fedor' fasse son apparition. Le debugscript va nous renvoyer alors:&lt;br /&gt;
{{Debug error|C:\&amp;lt;server path&amp;gt;\mods\deathmatch\resources\d\script.lua:15: attempt to call global 'outputChatbox' (a nil value)}}&lt;br /&gt;
Cela signifie que la fonction appelée n'existe pas, cela s'explique facilement par le fait que le nom de la fonction est ''outputChatBox'' (avec une capitale ''B''):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
if (getPlayerName(player) == &amp;quot;Fedor&amp;quot;) then&lt;br /&gt;
	outputChatBox(&amp;quot;Hello Fedor&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ceci n'est bien sûr qu'un exemple, il y a une multitude d'autres erreurs et problèmes, mais vous avez au moins une idée du débogage.&lt;br /&gt;
&lt;br /&gt;
==Debug logging==&lt;br /&gt;
You can also turn debug message logging on by editing ''coreconfig.xml'' in your GTA\MTA folder. You should find the following tag:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;debugfile/&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace that with a tag specifying the file you want to log messages to (file path is relative from the GTA folder):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;debugfile&amp;gt;MTA\debugscript.log&amp;lt;/debugfile&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All debug messages will be appended to the specified file from now on. To turn logging off, replace that line with an empty tag again.&lt;br /&gt;
&lt;br /&gt;
==Debug strategies==&lt;br /&gt;
There are several strategies that support finding errors, apart from going through the code of course. Most of them include outputting debug messages, with differing information depending on the situtation.&lt;br /&gt;
&lt;br /&gt;
===Fonctions Utiles===&lt;br /&gt;
Pour commencer, il y a quelques fonctions qui peuvent être utiles pour le ''débogage''.&lt;br /&gt;
* [[outputDebugString]] ou [[outputChatBox]] pour afficher des informations.&lt;br /&gt;
* [http://www.lua.org/manual/5.1/manual.html#pdf-tostring tostring()] sur une variable pour la convertir en chaîne de caractères, par exemple lorsque c'est un booléen.&lt;br /&gt;
* [[getElementType]] pour vérifier le type d'un élément de MTA.&lt;br /&gt;
&lt;br /&gt;
===Ajouter un message pour vérifier quand une condition ''if'', ''when'' ou ''how often'' est executée===&lt;br /&gt;
Un exemple typique qui vérifie si une condition ''if''est executée ou non. Il vous suffit d'ajouter un message que vous reconnaîtrez lorsqu'il s'affichera quand la condition sera executée.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
if (variable1 == variable2) then&lt;br /&gt;
	outputDebugString(&amp;quot;Condition vérifiée&amp;quot;)&lt;br /&gt;
	-- Instruction&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Une autre pratique serait de vérifier quand est-ce que la valeur de la variable est modifiée. Il faut pour cela chercher le moment où la variable est modifiée et ajouter une fonction qui permet l'affichage d'un message juste après.&lt;br /&gt;
&lt;br /&gt;
===Afficher un message pour vérifier la &amp;quot;valeur&amp;quot; d'une variable===&lt;br /&gt;
Prenons le cas ou vous voulez créer un checkpoint (marqueur), mais ce dernier n'apparaît pas à la position attendu. La première chose que vous allez faire sera de vérifier si la fonction [[createMarker]] est executée. Au lieu de faire ceci, vous pouvez vérifier les valeurs qui sont utilisées par la fonction [[createMarker]].&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
outputChatBox(tostring(x)..&amp;quot; &amp;quot;..tostring(y)..&amp;quot; &amp;quot;..tostring(z))&lt;br /&gt;
createMarker(x,y,z)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Ce code aura pour conséquence de vous afficher un message avec les trois valeurs des variables qui sont utilisées en tant que coordonnées pour le marqueur. Vous pouvez maintenant comparer les valeurs obtenues avec celle désirées. Le [http://www.lua.org/manual/5.1/manual.html#pdf-tostring tostring()] vous permettra de vous assurer que les valeurs des variables seront transformées en &amp;quot;string&amp;quot; (chaîne de caractères), même si c'est un boléen.&lt;br /&gt;
&lt;br /&gt;
==Exemple==&lt;br /&gt;
Imaginons que vous créiez un ''colshape'' (figure géométrique bi/tridimensionnelle pour détecter les collisions) quelque part et que vous souhaitiez qu'un joueur reste 10 secondes dans celle-ci avant d'éxecuter un code.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function colShapeHit(player)&lt;br /&gt;
	-- défini un timer pour afficher un message (le timer peut très bien éxécuter une fonction)&lt;br /&gt;
	-- stocke l'id du timer dans un tableau en utilisant le joueur (''player'') comme index/case.&lt;br /&gt;
	colshapeTimer[player] = setTimer(outputChatBox,10000,1,&amp;quot;Le joueur est depuis 10 secondes dans le colshape!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeHit&amp;quot;,getRootElement(),colShapeHit)&lt;br /&gt;
&lt;br /&gt;
function colShapeLeave(player)&lt;br /&gt;
	-- arrête le timer dès que le joueur quitte le colshape&lt;br /&gt;
	killTimer(colshapeTimer[player])&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeLeave&amp;quot;,getRootElement(),colShapeLeave)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Quand le joueur entre dans le colshape, le debugscript affiche le message suivant:&lt;br /&gt;
{{Debug error|..[path]: attempt to index global 'colshapeTimer' (a nil value)}}&lt;br /&gt;
Cela signifie que vous voulez stocker une valeur dans un tableau (à la case ''player'') qui n'existe pas. Dans l'exemple, le problème se pose quand vous voulez stocker l'id du timer dans le tableau. Nous devons donc vérifier si le tableau existe et si non en créer un.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function colShapeHit(player)&lt;br /&gt;
	if (colshapeTimer == nil) then&lt;br /&gt;
		colshapeTimer = {}&lt;br /&gt;
	end&lt;br /&gt;
	-- défini un timer pour afficher un message (le timer peut très bien éxécuter une fonction)&lt;br /&gt;
	-- stocke l'id du timer dans un tableau en utilisant le joueur (''player'') comme index/case.&lt;br /&gt;
	colshapeTimer[player] = setTimer(outputChatBox,10000,1,&amp;quot;Le joueur est depuis 10 secondes dans le colshape!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeHit&amp;quot;,getRootElement(),colShapeHit)&lt;br /&gt;
&lt;br /&gt;
function colShapeLeave(player)&lt;br /&gt;
	-- arrête le timer dès que le joueur quitte le colshape&lt;br /&gt;
	killTimer(colshapeTimer[player])&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeLeave&amp;quot;,getRootElement(),colShapeLeave)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ceci fait il nous reste quand même un ''warning'' (avertissement).Attendez le message et quittez à nouveau le colshape:&lt;br /&gt;
&lt;br /&gt;
{{Debug warning|[..]: Bad argument @ 'killTimer' Line: ..}}&lt;br /&gt;
&lt;br /&gt;
À part ceci (nous en parlerons plus tard) tous semble bien fonctionner. Un joueur entre dans le ''colshape'', le timer se lance, si il reste un message s'affiche, si il quitte le ''colshape'' le timer est arrêté.&lt;br /&gt;
&lt;br /&gt;
===Une erreur un peu plus complexe===&lt;br /&gt;
Cependant, pour une quelconque raison le message est envoyé deux fois quand on reste dans le cercle de collision alors qu'on est dans un véhicule. Since it would appear some code is executed twice, we add debug messages to check this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function colShapeHit(player)&lt;br /&gt;
	if (colshapeTimer == nil) then&lt;br /&gt;
		colshapeTimer = {}&lt;br /&gt;
	end&lt;br /&gt;
	-- ajout d'un message de debugage&lt;br /&gt;
	outputDebugString(&amp;quot;colShapeHit&amp;quot;)&lt;br /&gt;
	-- set a timer to output a message (could as well execute another function)&lt;br /&gt;
	-- store the timer id in a table, using the player as index&lt;br /&gt;
	colshapeTimer[player] = setTimer(outputChatBox,10000,1,&amp;quot;The player stayed 10 seconds in the colshape!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeHit&amp;quot;,getRootElement(),colShapeHit)&lt;br /&gt;
&lt;br /&gt;
function colShapeLeave(player)&lt;br /&gt;
	-- ajout d'un message de debugage&lt;br /&gt;
	outputDebugString(&amp;quot;colShapeLeave&amp;quot;)&lt;br /&gt;
	-- kill the timer when the player leaves the colshape&lt;br /&gt;
	killTimer(colshapeTimer[player])&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeLeave&amp;quot;,getRootElement(),colShapeLeave)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Nous remarquons que les deux fonctions rattachées aux événements sont éxécutées deux fois, mais seulement une lorsque qu'on est à pied. On peut donc penser que le véhicule déclenche aussi les événements. Pour confirmer cette théorie , nous allons vérifier la variable ''player'' qui '''devrait''' contenir un ''élément joueur''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function colShapeHit(player)&lt;br /&gt;
	if (colshapeTimer == nil) then&lt;br /&gt;
		colshapeTimer = {}&lt;br /&gt;
	end&lt;br /&gt;
	-- ajout d'un message de debugage avec le type de l'élément&lt;br /&gt;
	outputDebugString(&amp;quot;colShapeHit &amp;quot;..getElementType(player))&lt;br /&gt;
	-- set a timer to output a message (could as well execute another function)&lt;br /&gt;
	-- store the timer id in a table, using the player as index&lt;br /&gt;
	colshapeTimer[player] = setTimer(outputChatBox,10000,1,&amp;quot;The player stayed 10 seconds in the colshape!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeHit&amp;quot;,getRootElement(),colShapeHit)&lt;br /&gt;
&lt;br /&gt;
function colShapeLeave(player)&lt;br /&gt;
	-- ajout d'un message de debugage avec le type de l'élément&lt;br /&gt;
	outputDebugString(&amp;quot;colShapeLeave &amp;quot;..getElementType(player))&lt;br /&gt;
	-- kill the timer when the player leaves the colshape&lt;br /&gt;
	killTimer(colshapeTimer[player])&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeLeave&amp;quot;,getRootElement(),colShapeLeave)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Le message de débugage nous informe que, l'une des variables ''player'' est un joueur, et que l'autre, est un véhicule. Si nous voulons éxecuter notre code seulement quand un joueur entre dans le ''colshape'', nous devons rajouter un ''if'' (condition) qui stoppera l'éxecution du code si ce n'est pas un joueur.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function colShapeHit(player)&lt;br /&gt;
	if (colshapeTimer == nil) then&lt;br /&gt;
		colshapeTimer = {}&lt;br /&gt;
	end&lt;br /&gt;
	-- add a check for the element type&lt;br /&gt;
	if (getElementType(player) ~= &amp;quot;player&amp;quot;) then return end&lt;br /&gt;
	-- add a debug message, with the element type&lt;br /&gt;
	outputDebugString(&amp;quot;colShapeHit &amp;quot;..getElementType(player))&lt;br /&gt;
	-- set a timer to output a message (could as well execute another function)&lt;br /&gt;
	-- store the timer id in a table, using the player as index&lt;br /&gt;
	colshapeTimer[player] = setTimer(outputChatBox,10000,1,&amp;quot;The player stayed 10 seconds in the colshape!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeHit&amp;quot;,getRootElement(),colShapeHit)&lt;br /&gt;
&lt;br /&gt;
function colShapeLeave(player)&lt;br /&gt;
	-- add a check for the element type&lt;br /&gt;
	if (getElementType(player) ~= &amp;quot;player&amp;quot;) then return end&lt;br /&gt;
	-- add a debug message, with the element type&lt;br /&gt;
	outputDebugString(&amp;quot;colShapeLeave &amp;quot;..getElementType(player))&lt;br /&gt;
	-- kill the timer when the player leaves the colshape&lt;br /&gt;
	killTimer(colshapeTimer[player])&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeLeave&amp;quot;,getRootElement(),colShapeLeave)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Maintenant le code devrait fonctionner comme nous le souhaitions, mais nous avons toujours l'avertissement mentionné plus tôt. Cela est dû au fait que nous essayons d'arrêter un timer qui , quand le joueur est resté dans le colshape 10 secondes est éxecuté, n'existe plus. Il y a différentes façons de se débarasser de cet avertissement (si on part du principe qu'on sait qu'il n'existe plus à partir d'un certain moment et qu'on peut l'arrêter seulement si il ne s'est pas éxecuté).&lt;br /&gt;
Une des méthodes serait de vérifier si le timer stocker dans le tableau existe. Pour faire cela, nous devons utiliser [[isTimer]] avant d'arrêter le timer.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
if (isTimer(colshapeTimer[player])) then&lt;br /&gt;
	killTimer(colshapeTimer[player])&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Le code final ressemblerait à ceci:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function colShapeHit(player)&lt;br /&gt;
	if (colshapeTimer == nil) then&lt;br /&gt;
		colshapeTimer = {}&lt;br /&gt;
	end&lt;br /&gt;
	-- add a check for the element type&lt;br /&gt;
	if (getElementType(player) ~= &amp;quot;player&amp;quot;) then return end&lt;br /&gt;
	-- add a debug message, with the element type&lt;br /&gt;
	outputDebugString(&amp;quot;colShapeHit &amp;quot;..getElementType(player))&lt;br /&gt;
	-- set a timer to output a message (could as well execute another function)&lt;br /&gt;
	-- store the timer id in a table, using the player as index&lt;br /&gt;
	colshapeTimer[player] = setTimer(outputChatBox,10000,1,&amp;quot;The player stayed 10 seconds in the colshape!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeHit&amp;quot;,getRootElement(),colShapeHit)&lt;br /&gt;
&lt;br /&gt;
function colShapeLeave(player)&lt;br /&gt;
	-- add a check for the element type&lt;br /&gt;
	if (getElementType(player) ~= &amp;quot;player&amp;quot;) then return end&lt;br /&gt;
	-- add a debug message, with the element type&lt;br /&gt;
	outputDebugString(&amp;quot;colShapeLeave &amp;quot;..getElementType(player))&lt;br /&gt;
	-- kill the timer when the player leaves the colshape&lt;br /&gt;
	if (isTimer(colshapeTimer[player])) then&lt;br /&gt;
		killTimer(colshapeTimer[player])&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeLeave&amp;quot;,getRootElement(),colShapeLeave)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Debugging Performance Issues==&lt;br /&gt;
&lt;br /&gt;
Si vous serveur utilise plus de ressource qu'il ne devrait ou si vous voulez vous assurez que votre code est efficace, vous pourrez trouver les brebis galeuses avec l'outil ''performancebrowser''. Pour le lancer taper dans votre console &amp;quot;start performancebrowser&amp;quot; si cette ressource n'exite pas assurer de bien la posséder à l'emplacement adequat. Cet outil fourni un bon nombre d'information sur le debugage de perfomance. Fuite de mémoire, perte d'éléments et utilisation intensive du CPU sont facilement décelable via cet outil. Si vous utilisez l'option -d vous pourrez voir quelles fonctions utilisent de manière excéssive le CPU.&lt;br /&gt;
&lt;br /&gt;
Pour accèder au ''performancebrowser'' vous devez entrer cette adresse dans votre navigateur de recherche: http://serverIPHere:serverHTTPPortHere/performancebrowser/ Noterque le / à la fin est obligatoire. Donc par exemple: http://127.0.0.1:22005/performancebrowser/ . Ensuite, vous devez vous logguer en jeu avec un compte administrateur ou un compte ayant accès à la ressource &amp;quot;general.HTTP&amp;quot; . La plupart des informations dont vous aurez besoin se trouvent dans les catégories &amp;quot;Lua timing&amp;quot; et &amp;quot;Lua memory&amp;quot;. Chercher les valeurs qui sont plus élevées que les autres.&lt;br /&gt;
&lt;br /&gt;
===Exemples de code qui posent des problèmes de performances===&lt;br /&gt;
&lt;br /&gt;
L'ajout de données à un tableau sans les supprimer ensuite, même si ça prendra quelques mois ou années avant de poser des problèmes.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local someData = {}&lt;br /&gt;
&lt;br /&gt;
function storeData()&lt;br /&gt;
    someData[source] = true&lt;br /&gt;
    -- Rien ne gère le moment ou le joueur quitte le jeu, c'est donc considéré comme une perte de mémoire.&lt;br /&gt;
    -- Using the Lua timing tab you can detect the RAM usage of each resource.&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerJoin&amp;quot;, root, storeData)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Element leaking is possible if you use temporary colshapes for whatever reason and may not destroy them. This would cause bandwidth, CPU and memory performance issues over time.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function useTemporaryCol()&lt;br /&gt;
    local col = createColCircle(some code here)&lt;br /&gt;
    if (normally this should happen) then&lt;br /&gt;
        destroyElement(col)&lt;br /&gt;
    end&lt;br /&gt;
    -- But sometimes it didn't so the script ended but the collision area remained and over time&lt;br /&gt;
    -- you may end up with hundreds to thousands of pointless collision areas. &lt;br /&gt;
    -- The Lua timing tab allows you to see the amount of elements each script has created.&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
High CPU usage resulting in the server FPS dropping so much that the server is unplayable. In under 24 hours this can create havoc on a very busy server. The amount of &amp;quot;refs&amp;quot; in the Lua timing detect this type of build up, surprisingly the Lua timing tab didn't help in this case but Lua memory did.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerJoin&amp;quot;, root, function()&lt;br /&gt;
    -- Code for joiner&lt;br /&gt;
    addEventHandler(&amp;quot;onPlayerQuit&amp;quot;, root, function()&lt;br /&gt;
        -- Code for when they have quit&lt;br /&gt;
        -- See the problem? It's bound to root which the event handler is being added again and again and again&lt;br /&gt;
    end)&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A function uses up a lot of your CPU because whatever it does takes a long time. This is just some function that takes a long time to complete. Without performancebrowser you'd have no idea its the cause but with performancebrowser you can see that a resource is using lots of CPU in the Lua timing tab. If you then enter: -d into the options edit box it will even tell you what file name and first line of the function that is using up so much CPU.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function someDodgyCode()&lt;br /&gt;
    for i=1, 100000 do&lt;br /&gt;
        -- some code&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[it:Guida al Debug]]&lt;br /&gt;
[[Category:Scripting Concepts]]&lt;br /&gt;
[[ru:Debugging]]&lt;/div&gt;</summary>
		<author><name>Vincenzo</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=FR/Debugage&amp;diff=35471</id>
		<title>FR/Debugage</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=FR/Debugage&amp;diff=35471"/>
		<updated>2013-04-18T15:33:16Z</updated>

		<summary type="html">&lt;p&gt;Vincenzo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Quand vous scriptez vous pouvez passer à côté de certaines erreurs qui ne sont pas apparentes au premier coup d’œil. Cette page va essayer de vous indiquer quelques démarches à suivre pour localiser les erreurs.&lt;br /&gt;
&lt;br /&gt;
==Console de Débogage==&lt;br /&gt;
MTA a pour caractéristique de posséder une console de débogage qui comme son nom l'indique vous permet de déceler les erreurs dans les fonctions et scripts. Vous pouvez l'ouvrir en tapant ''debugscript x'' dans la console, ici ''x'' est le niveau de débogage:&lt;br /&gt;
* '''1:''' seulement les erreurs&lt;br /&gt;
* '''2:''' erreurs et warnings&lt;br /&gt;
* '''3:''' erreurs, warnings et messages d'informations&lt;br /&gt;
Ainsi, en tapant ''debugscript 3'' tout les messages seront visibles, cependant le niveau 2 est recommandé la plupart du temps pour le débogage. Quand vous testez vos scripts vous devez avoir le ''debugscript'' à disposition  , cela vous permettra de détecter facilement les fautes d'orthographes dans les fonctions ou toutes autres erreurs aussi simple.&lt;br /&gt;
&lt;br /&gt;
===Exemple===&lt;br /&gt;
L'exemple ci-dessous contient deux erreurs:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
if (getPlayerName(player) == &amp;quot;Fedor&amp;quot;)&lt;br /&gt;
	outputChatbox(&amp;quot;Hello Fedor&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Quand ce bout de code va être chargé, debugscript va vous renvoyer à peu près ceci:&lt;br /&gt;
{{Debug info|Loading script failed: C:\&amp;lt;server path&amp;gt;\mods\deathmatch\resources\myResource\script.lua:15: 'then' expected near ´outputChatbox'}}&lt;br /&gt;
Cela signifie que le code ne peut-être analysé/traité, car il y a une erreur de syntaxe. On vous montre le répertoire où se trouve le fichier, vous pouvez donc voir dans quelle ressource ce dernier se trouve ('myResource' dans notre cas) et bien sûr on vous donne le nom du fichier en question. Après le nom du fichier, on a le numéro de la ligne et encore après l'erreur/problème en question. C'est bien plus facile à résoudre maintenant, il manque juste 'then':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
if (getPlayerName(player) == &amp;quot;Fedor&amp;quot;) then&lt;br /&gt;
	outputChatbox(&amp;quot;Hello Fedor&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
A présent le bout de code se charge et ne renvoie aucune erreur, jusqu'à ce qu'un joueur avec le pseudo 'Fedor' fasse son apparition. Le debugscript va nous renvoyer alors:&lt;br /&gt;
{{Debug error|C:\&amp;lt;server path&amp;gt;\mods\deathmatch\resources\d\script.lua:15: attempt to call global 'outputChatbox' (a nil value)}}&lt;br /&gt;
Cela signifie que la fonction appelée n'existe pas, cela s'explique facilement par le fait que le nom de la fonction est ''outputChatBox'' (avec une capitale ''B''):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
if (getPlayerName(player) == &amp;quot;Fedor&amp;quot;) then&lt;br /&gt;
	outputChatBox(&amp;quot;Hello Fedor&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ceci n'est bien sûr qu'un exemple, il y a une multitude d'autres erreurs et problèmes, mais vous avez au moins une idée du débogage.&lt;br /&gt;
&lt;br /&gt;
==Debug logging==&lt;br /&gt;
You can also turn debug message logging on by editing ''coreconfig.xml'' in your GTA\MTA folder. You should find the following tag:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;debugfile/&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace that with a tag specifying the file you want to log messages to (file path is relative from the GTA folder):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;debugfile&amp;gt;MTA\debugscript.log&amp;lt;/debugfile&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All debug messages will be appended to the specified file from now on. To turn logging off, replace that line with an empty tag again.&lt;br /&gt;
&lt;br /&gt;
==Debug strategies==&lt;br /&gt;
There are several strategies that support finding errors, apart from going through the code of course. Most of them include outputting debug messages, with differing information depending on the situtation.&lt;br /&gt;
&lt;br /&gt;
===Fonctions Utiles===&lt;br /&gt;
Pour commencer, il y a quelques fonctions qui peuvent être utiles pour le ''débogage''.&lt;br /&gt;
* [[outputDebugString]] ou [[outputChatBox]] pour afficher des informations.&lt;br /&gt;
* [http://www.lua.org/manual/5.1/manual.html#pdf-tostring tostring()] sur une variable pour la convertir en chaîne de caractères, par exemple lorsque c'est un booléen.&lt;br /&gt;
* [[getElementType]] pour vérifier le type d'un élément de MTA.&lt;br /&gt;
&lt;br /&gt;
===Ajouter un message pour vérifier quand une condition ''if'', ''when'' ou ''how often'' est executée===&lt;br /&gt;
Un exemple typique qui vérifie si une condition ''if''est executée ou non. Il vous suffit d'ajouter un message que vous reconnaîtrez lorsqu'il s'affichera quand la condition sera executée.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
if (variable1 == variable2) then&lt;br /&gt;
	outputDebugString(&amp;quot;Condition vérifiée&amp;quot;)&lt;br /&gt;
	-- Instruction&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Une autre pratique serait de vérifier quand est-ce que la valeur de la variable est modifiée. Il faut pour cela chercher le moment où la variable est modifiée et ajouter une fonction qui permet l'affichage d'un message juste après.&lt;br /&gt;
&lt;br /&gt;
===Afficher un message pour vérifier la &amp;quot;valeur&amp;quot; d'une variable===&lt;br /&gt;
Prenons le cas ou vous voulez créer un checkpoint (marqueur), mais ce dernier n'apparaît pas à la position attendu. La première chose que vous allez faire sera de vérifier si la fonction [[createMarker]] est executée. Au lieu de faire ceci, vous pouvez vérifier les valeurs qui sont utilisées par la fonction [[createMarker]].&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
outputChatBox(tostring(x)..&amp;quot; &amp;quot;..tostring(y)..&amp;quot; &amp;quot;..tostring(z))&lt;br /&gt;
createMarker(x,y,z)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Ce code aura pour conséquence de vous afficher un message avec les trois valeurs des variables qui sont utilisées en tant que coordonnées pour le marqueur. Vous pouvez maintenant comparer les valeurs obtenues avec celle désirées. Le [http://www.lua.org/manual/5.1/manual.html#pdf-tostring tostring()] vous permettra de vous assurer que les valeurs des variables seront transformées en &amp;quot;string&amp;quot; (chaîne de caractères), même si c'est un boléen.&lt;br /&gt;
&lt;br /&gt;
==Exemple==&lt;br /&gt;
Imaginons que vous créiez un ''colshape'' (figure géométrique bi/tridimensionnelle pour détecter les collisions) quelque part et que vous souhaitiez qu'un joueur reste 10 secondes dans celle-ci avant d'éxecuter un code.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function colShapeHit(player)&lt;br /&gt;
	-- défini un timer pour afficher un message (le timer peut très bien éxécuter une fonction)&lt;br /&gt;
	-- stocke l'id du timer dans un tableau en utilisant le joueur (''player'') comme index/case.&lt;br /&gt;
	colshapeTimer[player] = setTimer(outputChatBox,10000,1,&amp;quot;Le joueur est depuis 10 secondes dans le colshape!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeHit&amp;quot;,getRootElement(),colShapeHit)&lt;br /&gt;
&lt;br /&gt;
function colShapeLeave(player)&lt;br /&gt;
	-- arrête le timer dès que le joueur quitte le colshape&lt;br /&gt;
	killTimer(colshapeTimer[player])&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeLeave&amp;quot;,getRootElement(),colShapeLeave)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Quand le joueur entre dans le colshape, le debugscript affiche le message suivant:&lt;br /&gt;
{{Debug error|..[path]: attempt to index global 'colshapeTimer' (a nil value)}}&lt;br /&gt;
Cela signifie que vous voulez stocker une valeur dans un tableau (à la case ''player'') qui n'existe pas. Dans l'exemple, le problème se pose quand vous voulez stocker l'id du timer dans le tableau. Nous devons donc vérifier si le tableau existe et si non en créer un.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function colShapeHit(player)&lt;br /&gt;
	if (colshapeTimer == nil) then&lt;br /&gt;
		colshapeTimer = {}&lt;br /&gt;
	end&lt;br /&gt;
	-- défini un timer pour afficher un message (le timer peut très bien éxécuter une fonction)&lt;br /&gt;
	-- stocke l'id du timer dans un tableau en utilisant le joueur (''player'') comme index/case.&lt;br /&gt;
	colshapeTimer[player] = setTimer(outputChatBox,10000,1,&amp;quot;Le joueur est depuis 10 secondes dans le colshape!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeHit&amp;quot;,getRootElement(),colShapeHit)&lt;br /&gt;
&lt;br /&gt;
function colShapeLeave(player)&lt;br /&gt;
	-- arrête le timer dès que le joueur quitte le colshape&lt;br /&gt;
	killTimer(colshapeTimer[player])&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeLeave&amp;quot;,getRootElement(),colShapeLeave)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ceci fait il nous reste quand même un ''warning'' (avertissement).Attendez le message et quittez à nouveau le colshape:&lt;br /&gt;
&lt;br /&gt;
{{Debug warning|[..]: Bad argument @ 'killTimer' Line: ..}}&lt;br /&gt;
&lt;br /&gt;
À part ceci (nous en parlerons plus tard) tous semble bien fonctionner. Un joueur entre dans le ''colshape'', le timer se lance, si il reste un message s'affiche, si il quitte le ''colshape'' le timer est arrêté.&lt;br /&gt;
&lt;br /&gt;
===Une erreur un peu plus complexe===&lt;br /&gt;
Cependant, pour une quelconque raison le message est envoyé deux fois quand on reste dans le cercle de collision alors qu'on est dans un véhicule. Since it would appear some code is executed twice, we add debug messages to check this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function colShapeHit(player)&lt;br /&gt;
	if (colshapeTimer == nil) then&lt;br /&gt;
		colshapeTimer = {}&lt;br /&gt;
	end&lt;br /&gt;
	-- ajout d'un message de debugage&lt;br /&gt;
	outputDebugString(&amp;quot;colShapeHit&amp;quot;)&lt;br /&gt;
	-- set a timer to output a message (could as well execute another function)&lt;br /&gt;
	-- store the timer id in a table, using the player as index&lt;br /&gt;
	colshapeTimer[player] = setTimer(outputChatBox,10000,1,&amp;quot;The player stayed 10 seconds in the colshape!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeHit&amp;quot;,getRootElement(),colShapeHit)&lt;br /&gt;
&lt;br /&gt;
function colShapeLeave(player)&lt;br /&gt;
	-- ajout d'un message de debugage&lt;br /&gt;
	outputDebugString(&amp;quot;colShapeLeave&amp;quot;)&lt;br /&gt;
	-- kill the timer when the player leaves the colshape&lt;br /&gt;
	killTimer(colshapeTimer[player])&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeLeave&amp;quot;,getRootElement(),colShapeLeave)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Nous remarquons que les deux fonctions rattachées aux événements sont éxécutées deux fois, mais seulement une lorsque qu'on est à pied. On peut donc penser que le véhicule déclenche aussi les événements. Pour confirmer cette théorie , nous allons vérifier la variable ''player'' qui '''devrait''' contenir un ''élément joueur''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function colShapeHit(player)&lt;br /&gt;
	if (colshapeTimer == nil) then&lt;br /&gt;
		colshapeTimer = {}&lt;br /&gt;
	end&lt;br /&gt;
	-- ajout d'un message de debugage avec le type de l'élément&lt;br /&gt;
	outputDebugString(&amp;quot;colShapeHit &amp;quot;..getElementType(player))&lt;br /&gt;
	-- set a timer to output a message (could as well execute another function)&lt;br /&gt;
	-- store the timer id in a table, using the player as index&lt;br /&gt;
	colshapeTimer[player] = setTimer(outputChatBox,10000,1,&amp;quot;The player stayed 10 seconds in the colshape!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeHit&amp;quot;,getRootElement(),colShapeHit)&lt;br /&gt;
&lt;br /&gt;
function colShapeLeave(player)&lt;br /&gt;
	-- ajout d'un message de debugage avec le type de l'élément&lt;br /&gt;
	outputDebugString(&amp;quot;colShapeLeave &amp;quot;..getElementType(player))&lt;br /&gt;
	-- kill the timer when the player leaves the colshape&lt;br /&gt;
	killTimer(colshapeTimer[player])&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeLeave&amp;quot;,getRootElement(),colShapeLeave)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Le message de débugage nous informe que, l'une des variables ''player'' est un joueur, et que l'autre, est un véhicule. Si nous voulons éxecuter notre code seulement quand un joueur entre dans le ''colshape'', nous devons rajouter un ''if'' (condition) qui stoppera l'éxecution du code si ce n'est pas un joueur.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function colShapeHit(player)&lt;br /&gt;
	if (colshapeTimer == nil) then&lt;br /&gt;
		colshapeTimer = {}&lt;br /&gt;
	end&lt;br /&gt;
	-- add a check for the element type&lt;br /&gt;
	if (getElementType(player) ~= &amp;quot;player&amp;quot;) then return end&lt;br /&gt;
	-- add a debug message, with the element type&lt;br /&gt;
	outputDebugString(&amp;quot;colShapeHit &amp;quot;..getElementType(player))&lt;br /&gt;
	-- set a timer to output a message (could as well execute another function)&lt;br /&gt;
	-- store the timer id in a table, using the player as index&lt;br /&gt;
	colshapeTimer[player] = setTimer(outputChatBox,10000,1,&amp;quot;The player stayed 10 seconds in the colshape!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeHit&amp;quot;,getRootElement(),colShapeHit)&lt;br /&gt;
&lt;br /&gt;
function colShapeLeave(player)&lt;br /&gt;
	-- add a check for the element type&lt;br /&gt;
	if (getElementType(player) ~= &amp;quot;player&amp;quot;) then return end&lt;br /&gt;
	-- add a debug message, with the element type&lt;br /&gt;
	outputDebugString(&amp;quot;colShapeLeave &amp;quot;..getElementType(player))&lt;br /&gt;
	-- kill the timer when the player leaves the colshape&lt;br /&gt;
	killTimer(colshapeTimer[player])&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeLeave&amp;quot;,getRootElement(),colShapeLeave)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Maintenant le code devrait fonctionner comme nous le souhaitions, mais nous avons toujours l'avertissement mentionné plus tôt. Cela est dû au fait que nous essayons d'arrêter un timer qui , quand le joueur est resté dans le colshape 10 secondes est éxecuté, n'existe plus. Il y a différentes façons de se débarasser de cet avertissement (si on part du principe qu'on sait qu'il n'existe plus à partir d'un certain moment et qu'on peut l'arrêter seulement si il ne s'est pas éxecuté).&lt;br /&gt;
Une des méthodes serait de vérifier si le timer stocker dans le tableau existe. Pour faire cela, nous devons utiliser [[isTimer]] avant d'arrêter le timer.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
if (isTimer(colshapeTimer[player])) then&lt;br /&gt;
	killTimer(colshapeTimer[player])&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Le code final ressemblerait à ceci:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function colShapeHit(player)&lt;br /&gt;
	if (colshapeTimer == nil) then&lt;br /&gt;
		colshapeTimer = {}&lt;br /&gt;
	end&lt;br /&gt;
	-- add a check for the element type&lt;br /&gt;
	if (getElementType(player) ~= &amp;quot;player&amp;quot;) then return end&lt;br /&gt;
	-- add a debug message, with the element type&lt;br /&gt;
	outputDebugString(&amp;quot;colShapeHit &amp;quot;..getElementType(player))&lt;br /&gt;
	-- set a timer to output a message (could as well execute another function)&lt;br /&gt;
	-- store the timer id in a table, using the player as index&lt;br /&gt;
	colshapeTimer[player] = setTimer(outputChatBox,10000,1,&amp;quot;The player stayed 10 seconds in the colshape!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeHit&amp;quot;,getRootElement(),colShapeHit)&lt;br /&gt;
&lt;br /&gt;
function colShapeLeave(player)&lt;br /&gt;
	-- add a check for the element type&lt;br /&gt;
	if (getElementType(player) ~= &amp;quot;player&amp;quot;) then return end&lt;br /&gt;
	-- add a debug message, with the element type&lt;br /&gt;
	outputDebugString(&amp;quot;colShapeLeave &amp;quot;..getElementType(player))&lt;br /&gt;
	-- kill the timer when the player leaves the colshape&lt;br /&gt;
	if (isTimer(colshapeTimer[player])) then&lt;br /&gt;
		killTimer(colshapeTimer[player])&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeLeave&amp;quot;,getRootElement(),colShapeLeave)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Debugging Performance Issues==&lt;br /&gt;
&lt;br /&gt;
If your server is using up more resources than it should or you just want to make sure your scripts are efficient you can find the cause using a great tool that comes with MTA SA server, performancebrowser. Make sure that its started with &amp;quot;start performancebrowser&amp;quot; if it doesn't exist then get it from the default resources that come with the server. This tool provides an incredible amount of information for performance debugging. Memory leaks, element leaks and CPU intensive scripts are all easily findable via performancebrowser. If you use -d option in Lua timing you can see which functions are using up the CPU.&lt;br /&gt;
&lt;br /&gt;
To access performancebrowser you will need to go to your web browser and enter the address: http://serverIPHere:serverHTTPPortHere/performancebrowser/ Note that the / at the end is required. So for example: http://127.0.0.1:22005/performancebrowser/ You will then need to login with an in-game admin account or any account that has access to &amp;quot;general.HTTP&amp;quot; Most of the information you will need are in the categories Lua timing and Lua memory, look for values that are much higher than other values.&lt;br /&gt;
&lt;br /&gt;
===Exemples de code qui posent des problèmes de performances===&lt;br /&gt;
&lt;br /&gt;
Adding data to a table but never removing it. This would take months/years before it causes a problem though.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local someData = {}&lt;br /&gt;
&lt;br /&gt;
function storeData()&lt;br /&gt;
    someData[source] = true&lt;br /&gt;
    -- There is no handling for when a player quits, this is considered a memory leak&lt;br /&gt;
    -- Using the Lua timing tab you can detect the RAM usage of each resource.&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerJoin&amp;quot;, root, storeData)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Element leaking is possible if you use temporary colshapes for whatever reason and may not destroy them. This would cause bandwidth, CPU and memory performance issues over time.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function useTemporaryCol()&lt;br /&gt;
    local col = createColCircle(some code here)&lt;br /&gt;
    if (normally this should happen) then&lt;br /&gt;
        destroyElement(col)&lt;br /&gt;
    end&lt;br /&gt;
    -- But sometimes it didn't so the script ended but the collision area remained and over time&lt;br /&gt;
    -- you may end up with hundreds to thousands of pointless collision areas. &lt;br /&gt;
    -- The Lua timing tab allows you to see the amount of elements each script has created.&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
High CPU usage resulting in the server FPS dropping so much that the server is unplayable. In under 24 hours this can create havoc on a very busy server. The amount of &amp;quot;refs&amp;quot; in the Lua timing detect this type of build up, surprisingly the Lua timing tab didn't help in this case but Lua memory did.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerJoin&amp;quot;, root, function()&lt;br /&gt;
    -- Code for joiner&lt;br /&gt;
    addEventHandler(&amp;quot;onPlayerQuit&amp;quot;, root, function()&lt;br /&gt;
        -- Code for when they have quit&lt;br /&gt;
        -- See the problem? It's bound to root which the event handler is being added again and again and again&lt;br /&gt;
    end)&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A function uses up a lot of your CPU because whatever it does takes a long time. This is just some function that takes a long time to complete. Without performancebrowser you'd have no idea its the cause but with performancebrowser you can see that a resource is using lots of CPU in the Lua timing tab. If you then enter: -d into the options edit box it will even tell you what file name and first line of the function that is using up so much CPU.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function someDodgyCode()&lt;br /&gt;
    for i=1, 100000 do&lt;br /&gt;
        -- some code&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[it:Guida al Debug]]&lt;br /&gt;
[[Category:Scripting Concepts]]&lt;br /&gt;
[[ru:Debugging]]&lt;/div&gt;</summary>
		<author><name>Vincenzo</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=FR/Debugage&amp;diff=35466</id>
		<title>FR/Debugage</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=FR/Debugage&amp;diff=35466"/>
		<updated>2013-04-18T13:23:14Z</updated>

		<summary type="html">&lt;p&gt;Vincenzo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Quand vous scriptez vous pouvez passer à côté de certaines erreurs qui ne sont pas apparentes au premier coup d’œil. Cette page va essayer de vous indiquer quelques démarches à suivre pour localiser les erreurs.&lt;br /&gt;
&lt;br /&gt;
==Console de Débogage==&lt;br /&gt;
MTA a pour caractéristique de posséder une console de débogage qui comme son nom l'indique vous permet de déceler les erreurs dans les fonctions et scripts. Vous pouvez l'ouvrir en tapant ''debugscript x'' dans la console, ici ''x'' est le niveau de débogage:&lt;br /&gt;
* '''1:''' seulement les erreurs&lt;br /&gt;
* '''2:''' erreurs et warnings&lt;br /&gt;
* '''3:''' erreurs, warnings et messages d'informations&lt;br /&gt;
Ainsi, en tapant ''debugscript 3'' tout les messages seront visibles, cependant le niveau 2 est recommandé la plupart du temps pour le débogage. Quand vous testez vos scripts vous devez avoir le ''debugscript'' à disposition  , cela vous permettra de détecter facilement les fautes d'orthographes dans les fonctions ou toutes autres erreurs aussi simple.&lt;br /&gt;
&lt;br /&gt;
===Exemple===&lt;br /&gt;
L'exemple ci-dessous contient deux erreurs:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
if (getPlayerName(player) == &amp;quot;Fedor&amp;quot;)&lt;br /&gt;
	outputChatbox(&amp;quot;Hello Fedor&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Quand ce bout de code va être chargé, debugscript va vous renvoyer à peu près ceci:&lt;br /&gt;
{{Debug info|Loading script failed: C:\&amp;lt;server path&amp;gt;\mods\deathmatch\resources\myResource\script.lua:15: 'then' expected near ´outputChatbox'}}&lt;br /&gt;
Cela signifie que le code ne peut-être analysé/traité, car il y a une erreur de syntaxe. On vous montre le répertoire où se trouve le fichier, vous pouvez donc voir dans quelle ressource ce dernier se trouve ('myResource' dans notre cas) et bien sûr on vous donne le nom du fichier en question. Après le nom du fichier, on a le numéro de la ligne et encore après l'erreur/problème en question. C'est bien plus facile à résoudre maintenant, il manque juste 'then':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
if (getPlayerName(player) == &amp;quot;Fedor&amp;quot;) then&lt;br /&gt;
	outputChatbox(&amp;quot;Hello Fedor&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
A présent le bout de code se charge et ne renvoie aucune erreur, jusqu'à ce qu'un joueur avec le pseudo 'Fedor' fasse son apparition. Le debugscript va nous renvoyer alors:&lt;br /&gt;
{{Debug error|C:\&amp;lt;server path&amp;gt;\mods\deathmatch\resources\d\script.lua:15: attempt to call global 'outputChatbox' (a nil value)}}&lt;br /&gt;
Cela signifie que la fonction appelée n'existe pas, cela s'explique facilement par le fait que le nom de la fonction est ''outputChatBox'' (avec une capitale ''B''):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
if (getPlayerName(player) == &amp;quot;Fedor&amp;quot;) then&lt;br /&gt;
	outputChatBox(&amp;quot;Hello Fedor&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ceci n'est bien sûr qu'un exemple, il y a une multitude d'autres erreurs et problèmes, mais vous avez au moins une idée du débogage.&lt;br /&gt;
&lt;br /&gt;
==Debug logging==&lt;br /&gt;
You can also turn debug message logging on by editing ''coreconfig.xml'' in your GTA\MTA folder. You should find the following tag:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;debugfile/&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace that with a tag specifying the file you want to log messages to (file path is relative from the GTA folder):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;debugfile&amp;gt;MTA\debugscript.log&amp;lt;/debugfile&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All debug messages will be appended to the specified file from now on. To turn logging off, replace that line with an empty tag again.&lt;br /&gt;
&lt;br /&gt;
==Debug strategies==&lt;br /&gt;
There are several strategies that support finding errors, apart from going through the code of course. Most of them include outputting debug messages, with differing information depending on the situtation.&lt;br /&gt;
&lt;br /&gt;
===Fonctions Utiles===&lt;br /&gt;
Pour commencer, il y a quelques fonctions qui peuvent être utiles pour le ''débogage''.&lt;br /&gt;
* [[outputDebugString]] ou [[outputChatBox]] pour afficher des informations.&lt;br /&gt;
* [http://www.lua.org/manual/5.1/manual.html#pdf-tostring tostring()] sur une variable pour la convertir en chaîne de caractères, par exemple lorsque c'est un booléen.&lt;br /&gt;
* [[getElementType]] pour vérifier le type d'un élément de MTA.&lt;br /&gt;
&lt;br /&gt;
===Ajouter un message pour vérifier quand une condition ''if'', ''when'' ou ''how often'' est executée===&lt;br /&gt;
Un exemple typique qui vérifie si une condition ''if''est executée ou non. Il vous suffit d'ajouter un message que vous reconnaîtrez lorsqu'il s'affichera quand la condition sera executée.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
if (variable1 == variable2) then&lt;br /&gt;
	outputDebugString(&amp;quot;Condition vérifiée&amp;quot;)&lt;br /&gt;
	-- Instruction&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Une autre pratique serait de vérifier quand est-ce que la valeur de la variable est modifiée. Il faut pour cela chercher le moment où la variable est modifiée et ajouter une fonction qui permet l'affichage d'un message juste après.&lt;br /&gt;
&lt;br /&gt;
===Afficher un message pour vérifier la &amp;quot;valeur&amp;quot; d'une variable===&lt;br /&gt;
Prenons le cas ou vous voulez créer un checkpoint (marqueur), mais ce dernier n'apparaît pas à la position attendu. La première chose que vous allez faire sera de vérifier si la fonction [[createMarker]] est executée. Au lieu de faire ceci, vous pouvez vérifier les valeurs qui sont utilisées par la fonction [[createMarker]].&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
outputChatBox(tostring(x)..&amp;quot; &amp;quot;..tostring(y)..&amp;quot; &amp;quot;..tostring(z))&lt;br /&gt;
createMarker(x,y,z)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Ce code aura pour conséquence de vous afficher un message avec les trois valeurs des variables qui sont utilisées en tant que coordonnées pour le marqueur. Vous pouvez maintenant comparer les valeurs obtenues avec celle désirées. Le [http://www.lua.org/manual/5.1/manual.html#pdf-tostring tostring()] vous permettra de vous assurer que les valeurs des variables seront transformées en &amp;quot;string&amp;quot; (chaîne de caractères), même si c'est un boléen.&lt;br /&gt;
&lt;br /&gt;
==Exemple==&lt;br /&gt;
Imaginons que vous créiez un ''colshape'' (figure géométrique bi/tridimensionnelle pour détecter les collisions) quelque part et que vous souhaitiez qu'un joueur reste 10 secondes dans celle-ci avant d'éxecuter un code.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function colShapeHit(player)&lt;br /&gt;
	-- défini un timer pour afficher un message (le timer peut très bien éxécuter une fonction)&lt;br /&gt;
	-- stocke l'id du timer dans un tableau en utilisant le joueur (''player'') comme index/case.&lt;br /&gt;
	colshapeTimer[player] = setTimer(outputChatBox,10000,1,&amp;quot;Le joueur est depuis 10 secondes dans le colshape!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeHit&amp;quot;,getRootElement(),colShapeHit)&lt;br /&gt;
&lt;br /&gt;
function colShapeLeave(player)&lt;br /&gt;
	-- arrête le timer dès que le joueur quitte le colshape&lt;br /&gt;
	killTimer(colshapeTimer[player])&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeLeave&amp;quot;,getRootElement(),colShapeLeave)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Quand le joueur entre dans le colshape, le debugscript affiche le message suivant:&lt;br /&gt;
{{Debug error|..[path]: attempt to index global 'colshapeTimer' (a nil value)}}&lt;br /&gt;
Cela signifie que vous voulez stocker une valeur dans un tableau (à la case ''player'') qui n'existe pas. Dans l'exemple, le problème se pose quand vous voulez stocker l'id du timer dans le tableau. Nous devons donc vérifier si le tableau existe et si non en créer un.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function colShapeHit(player)&lt;br /&gt;
	if (colshapeTimer == nil) then&lt;br /&gt;
		colshapeTimer = {}&lt;br /&gt;
	end&lt;br /&gt;
	-- défini un timer pour afficher un message (le timer peut très bien éxécuter une fonction)&lt;br /&gt;
	-- stocke l'id du timer dans un tableau en utilisant le joueur (''player'') comme index/case.&lt;br /&gt;
	colshapeTimer[player] = setTimer(outputChatBox,10000,1,&amp;quot;Le joueur est depuis 10 secondes dans le colshape!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeHit&amp;quot;,getRootElement(),colShapeHit)&lt;br /&gt;
&lt;br /&gt;
function colShapeLeave(player)&lt;br /&gt;
	-- arrête le timer dès que le joueur quitte le colshape&lt;br /&gt;
	killTimer(colshapeTimer[player])&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeLeave&amp;quot;,getRootElement(),colShapeLeave)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ceci fait il nous reste quand même un ''warning'' (avertissement).Attendez le message et quittez à nouveau le colshape:&lt;br /&gt;
&lt;br /&gt;
{{Debug warning|[..]: Bad argument @ 'killTimer' Line: ..}}&lt;br /&gt;
&lt;br /&gt;
Except for that (we will talk about that later) everything seems to work fine. A player enters the colshape, the timer is started, if he stays the message occurs, if he leaves the timer is killed.&lt;br /&gt;
&lt;br /&gt;
===A more inconspicuous error===&lt;br /&gt;
But for some reason the message gets outputted twice when you stay in the colcircle while in a vehicle. Since it would appear some code is executed twice, we add debug messages to check this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function colShapeHit(player)&lt;br /&gt;
	if (colshapeTimer == nil) then&lt;br /&gt;
		colshapeTimer = {}&lt;br /&gt;
	end&lt;br /&gt;
	-- add a debug message&lt;br /&gt;
	outputDebugString(&amp;quot;colShapeHit&amp;quot;)&lt;br /&gt;
	-- set a timer to output a message (could as well execute another function)&lt;br /&gt;
	-- store the timer id in a table, using the player as index&lt;br /&gt;
	colshapeTimer[player] = setTimer(outputChatBox,10000,1,&amp;quot;The player stayed 10 seconds in the colshape!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeHit&amp;quot;,getRootElement(),colShapeHit)&lt;br /&gt;
&lt;br /&gt;
function colShapeLeave(player)&lt;br /&gt;
	-- add a debug message&lt;br /&gt;
	outputDebugString(&amp;quot;colShapeLeave&amp;quot;)&lt;br /&gt;
	-- kill the timer when the player leaves the colshape&lt;br /&gt;
	killTimer(colshapeTimer[player])&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeLeave&amp;quot;,getRootElement(),colShapeLeave)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we notice that both handler functions get executed twice when we are in a vehicle, but only once when we are on-foot. It would appear the vehicle triggers the colshape as well. To confirm this theory, we check the ''player'' variable that '''should''' contain a player element.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function colShapeHit(player)&lt;br /&gt;
	if (colshapeTimer == nil) then&lt;br /&gt;
		colshapeTimer = {}&lt;br /&gt;
	end&lt;br /&gt;
	-- add a debug message, with the element type&lt;br /&gt;
	outputDebugString(&amp;quot;colShapeHit &amp;quot;..getElementType(player))&lt;br /&gt;
	-- set a timer to output a message (could as well execute another function)&lt;br /&gt;
	-- store the timer id in a table, using the player as index&lt;br /&gt;
	colshapeTimer[player] = setTimer(outputChatBox,10000,1,&amp;quot;The player stayed 10 seconds in the colshape!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeHit&amp;quot;,getRootElement(),colShapeHit)&lt;br /&gt;
&lt;br /&gt;
function colShapeLeave(player)&lt;br /&gt;
	-- add a debug message, with the element type&lt;br /&gt;
	outputDebugString(&amp;quot;colShapeLeave &amp;quot;..getElementType(player))&lt;br /&gt;
	-- kill the timer when the player leaves the colshape&lt;br /&gt;
	killTimer(colshapeTimer[player])&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeLeave&amp;quot;,getRootElement(),colShapeLeave)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The debug messages tell us that one of the ''player'' variables is a player, the other one a vehicle element. Since we only want to react when a player enters the colshape, we add an ''if'' that will end the execution of the function if it's '''not''' an player element.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function colShapeHit(player)&lt;br /&gt;
	if (colshapeTimer == nil) then&lt;br /&gt;
		colshapeTimer = {}&lt;br /&gt;
	end&lt;br /&gt;
	-- add a check for the element type&lt;br /&gt;
	if (getElementType(player) ~= &amp;quot;player&amp;quot;) then return end&lt;br /&gt;
	-- add a debug message, with the element type&lt;br /&gt;
	outputDebugString(&amp;quot;colShapeHit &amp;quot;..getElementType(player))&lt;br /&gt;
	-- set a timer to output a message (could as well execute another function)&lt;br /&gt;
	-- store the timer id in a table, using the player as index&lt;br /&gt;
	colshapeTimer[player] = setTimer(outputChatBox,10000,1,&amp;quot;The player stayed 10 seconds in the colshape!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeHit&amp;quot;,getRootElement(),colShapeHit)&lt;br /&gt;
&lt;br /&gt;
function colShapeLeave(player)&lt;br /&gt;
	-- add a check for the element type&lt;br /&gt;
	if (getElementType(player) ~= &amp;quot;player&amp;quot;) then return end&lt;br /&gt;
	-- add a debug message, with the element type&lt;br /&gt;
	outputDebugString(&amp;quot;colShapeLeave &amp;quot;..getElementType(player))&lt;br /&gt;
	-- kill the timer when the player leaves the colshape&lt;br /&gt;
	killTimer(colshapeTimer[player])&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeLeave&amp;quot;,getRootElement(),colShapeLeave)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now the script should work as desired, but will still output the warning mentioned above. This happens because the timer we try to kill when a player leaves the colshape will not exist anymore when it reached the 10 seconds and is executed. There are different ways to get rid of that warning (since you know that the timer might not exist anymore and you only want to kill it if it is there). One way would be to check if the timer referenced in the table really exists. To do this, we need to use [[isTimer]], which we will use when we kill the timer:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
if (isTimer(colshapeTimer[player])) then&lt;br /&gt;
	killTimer(colshapeTimer[player])&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So the complete working code would be:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function colShapeHit(player)&lt;br /&gt;
	if (colshapeTimer == nil) then&lt;br /&gt;
		colshapeTimer = {}&lt;br /&gt;
	end&lt;br /&gt;
	-- add a check for the element type&lt;br /&gt;
	if (getElementType(player) ~= &amp;quot;player&amp;quot;) then return end&lt;br /&gt;
	-- add a debug message, with the element type&lt;br /&gt;
	outputDebugString(&amp;quot;colShapeHit &amp;quot;..getElementType(player))&lt;br /&gt;
	-- set a timer to output a message (could as well execute another function)&lt;br /&gt;
	-- store the timer id in a table, using the player as index&lt;br /&gt;
	colshapeTimer[player] = setTimer(outputChatBox,10000,1,&amp;quot;The player stayed 10 seconds in the colshape!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeHit&amp;quot;,getRootElement(),colShapeHit)&lt;br /&gt;
&lt;br /&gt;
function colShapeLeave(player)&lt;br /&gt;
	-- add a check for the element type&lt;br /&gt;
	if (getElementType(player) ~= &amp;quot;player&amp;quot;) then return end&lt;br /&gt;
	-- add a debug message, with the element type&lt;br /&gt;
	outputDebugString(&amp;quot;colShapeLeave &amp;quot;..getElementType(player))&lt;br /&gt;
	-- kill the timer when the player leaves the colshape&lt;br /&gt;
	if (isTimer(colshapeTimer[player])) then&lt;br /&gt;
		killTimer(colshapeTimer[player])&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onColShapeLeave&amp;quot;,getRootElement(),colShapeLeave)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Debugging Performance Issues==&lt;br /&gt;
&lt;br /&gt;
If your server is using up more resources than it should or you just want to make sure your scripts are efficient you can find the cause using a great tool that comes with MTA SA server, performancebrowser. Make sure that its started with &amp;quot;start performancebrowser&amp;quot; if it doesn't exist then get it from the default resources that come with the server. This tool provides an incredible amount of information for performance debugging. Memory leaks, element leaks and CPU intensive scripts are all easily findable via performancebrowser. If you use -d option in Lua timing you can see which functions are using up the CPU.&lt;br /&gt;
&lt;br /&gt;
To access performancebrowser you will need to go to your web browser and enter the address: http://serverIPHere:serverHTTPPortHere/performancebrowser/ Note that the / at the end is required. So for example: http://127.0.0.1:22005/performancebrowser/ You will then need to login with an in-game admin account or any account that has access to &amp;quot;general.HTTP&amp;quot; Most of the information you will need are in the categories Lua timing and Lua memory, look for values that are much higher than other values.&lt;br /&gt;
&lt;br /&gt;
===Examples of scripts that could cause performance problems===&lt;br /&gt;
&lt;br /&gt;
Adding data to a table but never removing it. This would take months/years before it causes a problem though.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local someData = {}&lt;br /&gt;
&lt;br /&gt;
function storeData()&lt;br /&gt;
    someData[source] = true&lt;br /&gt;
    -- There is no handling for when a player quits, this is considered a memory leak&lt;br /&gt;
    -- Using the Lua timing tab you can detect the RAM usage of each resource.&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerJoin&amp;quot;, root, storeData)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Element leaking is possible if you use temporary colshapes for whatever reason and may not destroy them. This would cause bandwidth, CPU and memory performance issues over time.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function useTemporaryCol()&lt;br /&gt;
    local col = createColCircle(some code here)&lt;br /&gt;
    if (normally this should happen) then&lt;br /&gt;
        destroyElement(col)&lt;br /&gt;
    end&lt;br /&gt;
    -- But sometimes it didn't so the script ended but the collision area remained and over time&lt;br /&gt;
    -- you may end up with hundreds to thousands of pointless collision areas. &lt;br /&gt;
    -- The Lua timing tab allows you to see the amount of elements each script has created.&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
High CPU usage resulting in the server FPS dropping so much that the server is unplayable. In under 24 hours this can create havoc on a very busy server. The amount of &amp;quot;refs&amp;quot; in the Lua timing detect this type of build up, surprisingly the Lua timing tab didn't help in this case but Lua memory did.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerJoin&amp;quot;, root, function()&lt;br /&gt;
    -- Code for joiner&lt;br /&gt;
    addEventHandler(&amp;quot;onPlayerQuit&amp;quot;, root, function()&lt;br /&gt;
        -- Code for when they have quit&lt;br /&gt;
        -- See the problem? It's bound to root which the event handler is being added again and again and again&lt;br /&gt;
    end)&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A function uses up a lot of your CPU because whatever it does takes a long time. This is just some function that takes a long time to complete. Without performancebrowser you'd have no idea its the cause but with performancebrowser you can see that a resource is using lots of CPU in the Lua timing tab. If you then enter: -d into the options edit box it will even tell you what file name and first line of the function that is using up so much CPU.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function someDodgyCode()&lt;br /&gt;
    for i=1, 100000 do&lt;br /&gt;
        -- some code&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[it:Guida al Debug]]&lt;br /&gt;
[[Category:Scripting Concepts]]&lt;br /&gt;
[[ru:Debugging]]&lt;/div&gt;</summary>
		<author><name>Vincenzo</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Page_d%27accueil&amp;diff=28832</id>
		<title>Page d'accueil</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Page_d%27accueil&amp;diff=28832"/>
		<updated>2011-12-26T01:38:03Z</updated>

		<summary type="html">&lt;p&gt;Vincenzo: /* Programmer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;background: #FFEEAA; padding: 5px; float:right; width: 30%;&amp;quot;&amp;gt;Dernière version stable de '''Multi Theft Auto: San Andreas''' est '''{{Current Version|full}}'''. Rendez-vous sur la [http://mtasa.com/ page principale] pour la télécharger.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Vous pouvez aussi télécharger une [http://nightly.mtasa.com/ beta] pour avoir la dernière version ( non stable ).&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
Bienvenue sur le wiki de Multi Theft Auto. Sur ce wiki, vous trouverez des tas d'informations sur Multi Theft Auto.&lt;br /&gt;
&lt;br /&gt;
Il y a [[How you can help|différents moyens de nous aider]]: créer une map, un gamemode, rediger des articles sur des fonctions, écrire un exemple, écrire un tutorial ou juste jouer à MTA et nous rapportez les bugs trouvés.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
====Pour commencer====&lt;br /&gt;
&lt;br /&gt;
* [[fr/Manuel_Client|Manuel Client]] ( Traduction: [http://wiki.multitheftauto.com/wiki/User:DrawKiie DrawKiie] )&lt;br /&gt;
* [[fr/Manuel_Serveur|Manuel Serveur]] ( Traduction: [http://wiki.multitheftauto.com/wiki/User:Rouche Rouche] )&lt;br /&gt;
* [[fr/Problemes_connus|Problèmes connus]] ( Traduction: [http://wiki.multitheftauto.com/wiki/User:Rouche Rouche] )&lt;br /&gt;
* [[fr/Migrer_de_MTARace_a_MTASA_1.0.x|Migrer de MTA:Race à MTA:SA 1.0.x]] ( Traduction: [http://wiki.multitheftauto.com/wiki/User:Rouche Rouche] )&lt;br /&gt;
* [[fr/A propos des Map|A propos des Map]] ( Traduction: [http://wiki.multitheftauto.com/wiki/User:Rouche Rouche] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Programmer====&lt;br /&gt;
&lt;br /&gt;
* [[fr/Introduction_Programmation|Introduction: La programmation]] ( Traduction: [http://wiki.multitheftauto.com/wiki/User:Citizen Citizen] )&lt;br /&gt;
* [[fr/Introduction_GUI|Introduction: Le GUI]] ( Traduction: [http://wiki.multitheftauto.com/wiki/User:FatalTeror FatalTerror] )&lt;br /&gt;
* [[fr/Debugage|Tutoriel: Le débugage]] - Comment trouver les erreurs dans son script (Traduction:[http://wiki.multitheftauto.com/wiki/User:Vincenzo Vincenzo] alias Vincentdu90)&lt;br /&gt;
* [[fr/Ressources|Introduction: Les ressources]]&lt;br /&gt;
** [[fr/Ressource_Acces_Internet|Introduction: L'accès internet]] - Comment créer un site à partir d'une ressource&lt;br /&gt;
** [[:Category:Resource|Catalogue des ressources]]&lt;br /&gt;
** [[fr/Meta.xml|Meta.xml]] - Derière chaque ressource ce trouve une meta pour la définir&lt;br /&gt;
** [[fr/ACL|ACL]] - Access Control List, pour définir les autorisations&lt;br /&gt;
* [[fr/Ecrire_Gamemode|Créer un gamemode]]&lt;br /&gt;
* [[fr/Fonctions_Utiles|Fonctions Utiles]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Bases de données====&lt;br /&gt;
Cette section décrit toutes les capacités fournient par le LUA/MTA ou par les ressources.&lt;br /&gt;
* [[:Category:Resource|Catalogue des ressources]] - Vous devez le lire pour faire un script appropriés&lt;br /&gt;
* [[fr/Les_scripts_clients| Les scripts clients]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Aide générale du LUA====&lt;br /&gt;
Des pages conçues pour aider votre compréhension du Lua&lt;br /&gt;
*[http://www.lua.org/pil/index.html &amp;quot;Programming in Lua&amp;quot;]&lt;br /&gt;
**[http://www.lua.org/manual/5.1/#index Les fonctions Lua]&lt;br /&gt;
*[http://lua-users.org/wiki/TutorialDirectory wiki Lua]&lt;br /&gt;
*[http://nixstaller.berlios.de/manual/0.2/nixstaller_9.html Un guide général au Lua de Nixstaller]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Map Editor====&lt;br /&gt;
*[[Resource:Editor|Manuel]]&lt;br /&gt;
*[[Resource:Editor/EDF|Editor Definition Format]]&lt;br /&gt;
*[[Resource:Editor/Plugins|Plugins]]&lt;br /&gt;
*[[Resource:Editor#FAQ|Questions Fréquentes]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Développer Multi Theft Auto====&lt;br /&gt;
* [[fr/Compiler_MTASA|Compiler MTASA sur Windows]]&lt;br /&gt;
* [[fr/Compiler_MTASA_Server_sur_Mac_OS_X|Compiler MTASA sur Mac OS X]]&lt;br /&gt;
* [[fr/Compiler_MTASA_Server_sur_GNU_Linux|Compiler MTASA sur GNU/Linux]]&lt;br /&gt;
* [[fr/Directives_de_codage|Directives de codage]]&lt;br /&gt;
* [http://code.google.com/p/mtasa-blue Google Code SVN]&lt;br /&gt;
* [[fr/Roadmap|Roadmap]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px; background:#CCCCFF;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Références====&lt;br /&gt;
* [[fr/Fonctions_Clients|Fonctions Clients]]&lt;br /&gt;
* [[fr/Events_Clients|Events Clients]]&lt;br /&gt;
* [[fr/Fonctions_Serveurs|Fonctions Clients]]&lt;br /&gt;
* [[fr/Events_Serveurs|Events Clients]]&lt;br /&gt;
&amp;lt;!-- Incomplet * [[Module functions|Server-side external module scripting functions list]] --&amp;gt;&lt;br /&gt;
* [[fr/MTA Classes]] - Les descriptions détaillées de tous les types personnalisés MTA&lt;br /&gt;
** [[fr/Element|MTA Elements]] / [[Element tree]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====[[Id|ID Listes]]====&lt;br /&gt;
*[[fr/Animations|Animations]]&lt;br /&gt;
*[[fr/Skins_Personnages|Skins Personnages]]&lt;br /&gt;
*[[fr/Vetements_CJ|Vêtements CJ]]&lt;br /&gt;
*[[fr/Garage|Garage IDs]]&lt;br /&gt;
*[[fr/Interieurs_IDs|Intérieurs IDs]]&lt;br /&gt;
*[[fr/Materiel_IDs|Matériel IDs]]&lt;br /&gt;
*[[fr/Projectiles|Projectiles]]&lt;br /&gt;
*[[fr/Radar Blips]]&lt;br /&gt;
*[[fr/Sons|Sons]]&lt;br /&gt;
*[[fr/Vehicule_IDs|ID des véhicules]]&lt;br /&gt;
*[[fr/Vehicule_Couleurs|Couleurs véhicules]]&lt;br /&gt;
*[[fr/Vehicule_Upgrades|Tuning IDs]]&lt;br /&gt;
*[[fr/Armes|Armes]]&lt;br /&gt;
*[[fr/Meteos|Météos]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
|}&lt;br /&gt;
[[pl:Main Page]]&lt;br /&gt;
[[ru:Main Page]]&lt;br /&gt;
[[it:Pagina principale]]&lt;br /&gt;
[[nl:Main Page]]&lt;br /&gt;
[[de:Hauptseite]]&lt;br /&gt;
[[es:Pagina Principal]]&lt;/div&gt;</summary>
		<author><name>Vincenzo</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Page_d%27accueil&amp;diff=28831</id>
		<title>Page d'accueil</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Page_d%27accueil&amp;diff=28831"/>
		<updated>2011-12-26T01:37:47Z</updated>

		<summary type="html">&lt;p&gt;Vincenzo: /* Programmer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;background: #FFEEAA; padding: 5px; float:right; width: 30%;&amp;quot;&amp;gt;Dernière version stable de '''Multi Theft Auto: San Andreas''' est '''{{Current Version|full}}'''. Rendez-vous sur la [http://mtasa.com/ page principale] pour la télécharger.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Vous pouvez aussi télécharger une [http://nightly.mtasa.com/ beta] pour avoir la dernière version ( non stable ).&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
Bienvenue sur le wiki de Multi Theft Auto. Sur ce wiki, vous trouverez des tas d'informations sur Multi Theft Auto.&lt;br /&gt;
&lt;br /&gt;
Il y a [[How you can help|différents moyens de nous aider]]: créer une map, un gamemode, rediger des articles sur des fonctions, écrire un exemple, écrire un tutorial ou juste jouer à MTA et nous rapportez les bugs trouvés.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
====Pour commencer====&lt;br /&gt;
&lt;br /&gt;
* [[fr/Manuel_Client|Manuel Client]] ( Traduction: [http://wiki.multitheftauto.com/wiki/User:DrawKiie DrawKiie] )&lt;br /&gt;
* [[fr/Manuel_Serveur|Manuel Serveur]] ( Traduction: [http://wiki.multitheftauto.com/wiki/User:Rouche Rouche] )&lt;br /&gt;
* [[fr/Problemes_connus|Problèmes connus]] ( Traduction: [http://wiki.multitheftauto.com/wiki/User:Rouche Rouche] )&lt;br /&gt;
* [[fr/Migrer_de_MTARace_a_MTASA_1.0.x|Migrer de MTA:Race à MTA:SA 1.0.x]] ( Traduction: [http://wiki.multitheftauto.com/wiki/User:Rouche Rouche] )&lt;br /&gt;
* [[fr/A propos des Map|A propos des Map]] ( Traduction: [http://wiki.multitheftauto.com/wiki/User:Rouche Rouche] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Programmer====&lt;br /&gt;
&lt;br /&gt;
* [[fr/Introduction_Programmation|Introduction: La programmation]] ( Traduction: [http://wiki.multitheftauto.com/wiki/User:Citizen Citizen] )&lt;br /&gt;
* [[fr/Introduction_GUI|Introduction: Le GUI]] ( Traduction: [http://wiki.multitheftauto.com/wiki/User:FatalTeror FatalTerror] )&lt;br /&gt;
* [[fr/Debugage|Tutoriel: Le débugage]] - Comment trouver les erreurs dans son script(Traduction:[http://wiki.multitheftauto.com/wiki/User:Vincenzo Vincenzo] alias Vincentdu90)&lt;br /&gt;
* [[fr/Ressources|Introduction: Les ressources]]&lt;br /&gt;
** [[fr/Ressource_Acces_Internet|Introduction: L'accès internet]] - Comment créer un site à partir d'une ressource&lt;br /&gt;
** [[:Category:Resource|Catalogue des ressources]]&lt;br /&gt;
** [[fr/Meta.xml|Meta.xml]] - Derière chaque ressource ce trouve une meta pour la définir&lt;br /&gt;
** [[fr/ACL|ACL]] - Access Control List, pour définir les autorisations&lt;br /&gt;
* [[fr/Ecrire_Gamemode|Créer un gamemode]]&lt;br /&gt;
* [[fr/Fonctions_Utiles|Fonctions Utiles]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Bases de données====&lt;br /&gt;
Cette section décrit toutes les capacités fournient par le LUA/MTA ou par les ressources.&lt;br /&gt;
* [[:Category:Resource|Catalogue des ressources]] - Vous devez le lire pour faire un script appropriés&lt;br /&gt;
* [[fr/Les_scripts_clients| Les scripts clients]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Aide générale du LUA====&lt;br /&gt;
Des pages conçues pour aider votre compréhension du Lua&lt;br /&gt;
*[http://www.lua.org/pil/index.html &amp;quot;Programming in Lua&amp;quot;]&lt;br /&gt;
**[http://www.lua.org/manual/5.1/#index Les fonctions Lua]&lt;br /&gt;
*[http://lua-users.org/wiki/TutorialDirectory wiki Lua]&lt;br /&gt;
*[http://nixstaller.berlios.de/manual/0.2/nixstaller_9.html Un guide général au Lua de Nixstaller]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Map Editor====&lt;br /&gt;
*[[Resource:Editor|Manuel]]&lt;br /&gt;
*[[Resource:Editor/EDF|Editor Definition Format]]&lt;br /&gt;
*[[Resource:Editor/Plugins|Plugins]]&lt;br /&gt;
*[[Resource:Editor#FAQ|Questions Fréquentes]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Développer Multi Theft Auto====&lt;br /&gt;
* [[fr/Compiler_MTASA|Compiler MTASA sur Windows]]&lt;br /&gt;
* [[fr/Compiler_MTASA_Server_sur_Mac_OS_X|Compiler MTASA sur Mac OS X]]&lt;br /&gt;
* [[fr/Compiler_MTASA_Server_sur_GNU_Linux|Compiler MTASA sur GNU/Linux]]&lt;br /&gt;
* [[fr/Directives_de_codage|Directives de codage]]&lt;br /&gt;
* [http://code.google.com/p/mtasa-blue Google Code SVN]&lt;br /&gt;
* [[fr/Roadmap|Roadmap]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px; background:#CCCCFF;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Références====&lt;br /&gt;
* [[fr/Fonctions_Clients|Fonctions Clients]]&lt;br /&gt;
* [[fr/Events_Clients|Events Clients]]&lt;br /&gt;
* [[fr/Fonctions_Serveurs|Fonctions Clients]]&lt;br /&gt;
* [[fr/Events_Serveurs|Events Clients]]&lt;br /&gt;
&amp;lt;!-- Incomplet * [[Module functions|Server-side external module scripting functions list]] --&amp;gt;&lt;br /&gt;
* [[fr/MTA Classes]] - Les descriptions détaillées de tous les types personnalisés MTA&lt;br /&gt;
** [[fr/Element|MTA Elements]] / [[Element tree]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====[[Id|ID Listes]]====&lt;br /&gt;
*[[fr/Animations|Animations]]&lt;br /&gt;
*[[fr/Skins_Personnages|Skins Personnages]]&lt;br /&gt;
*[[fr/Vetements_CJ|Vêtements CJ]]&lt;br /&gt;
*[[fr/Garage|Garage IDs]]&lt;br /&gt;
*[[fr/Interieurs_IDs|Intérieurs IDs]]&lt;br /&gt;
*[[fr/Materiel_IDs|Matériel IDs]]&lt;br /&gt;
*[[fr/Projectiles|Projectiles]]&lt;br /&gt;
*[[fr/Radar Blips]]&lt;br /&gt;
*[[fr/Sons|Sons]]&lt;br /&gt;
*[[fr/Vehicule_IDs|ID des véhicules]]&lt;br /&gt;
*[[fr/Vehicule_Couleurs|Couleurs véhicules]]&lt;br /&gt;
*[[fr/Vehicule_Upgrades|Tuning IDs]]&lt;br /&gt;
*[[fr/Armes|Armes]]&lt;br /&gt;
*[[fr/Meteos|Météos]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
|}&lt;br /&gt;
[[pl:Main Page]]&lt;br /&gt;
[[ru:Main Page]]&lt;br /&gt;
[[it:Pagina principale]]&lt;br /&gt;
[[nl:Main Page]]&lt;br /&gt;
[[de:Hauptseite]]&lt;br /&gt;
[[es:Pagina Principal]]&lt;/div&gt;</summary>
		<author><name>Vincenzo</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Page_d%27accueil&amp;diff=28830</id>
		<title>Page d'accueil</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Page_d%27accueil&amp;diff=28830"/>
		<updated>2011-12-26T01:37:14Z</updated>

		<summary type="html">&lt;p&gt;Vincenzo: /* Programmer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;background: #FFEEAA; padding: 5px; float:right; width: 30%;&amp;quot;&amp;gt;Dernière version stable de '''Multi Theft Auto: San Andreas''' est '''{{Current Version|full}}'''. Rendez-vous sur la [http://mtasa.com/ page principale] pour la télécharger.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Vous pouvez aussi télécharger une [http://nightly.mtasa.com/ beta] pour avoir la dernière version ( non stable ).&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
Bienvenue sur le wiki de Multi Theft Auto. Sur ce wiki, vous trouverez des tas d'informations sur Multi Theft Auto.&lt;br /&gt;
&lt;br /&gt;
Il y a [[How you can help|différents moyens de nous aider]]: créer une map, un gamemode, rediger des articles sur des fonctions, écrire un exemple, écrire un tutorial ou juste jouer à MTA et nous rapportez les bugs trouvés.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
====Pour commencer====&lt;br /&gt;
&lt;br /&gt;
* [[fr/Manuel_Client|Manuel Client]] ( Traduction: [http://wiki.multitheftauto.com/wiki/User:DrawKiie DrawKiie] )&lt;br /&gt;
* [[fr/Manuel_Serveur|Manuel Serveur]] ( Traduction: [http://wiki.multitheftauto.com/wiki/User:Rouche Rouche] )&lt;br /&gt;
* [[fr/Problemes_connus|Problèmes connus]] ( Traduction: [http://wiki.multitheftauto.com/wiki/User:Rouche Rouche] )&lt;br /&gt;
* [[fr/Migrer_de_MTARace_a_MTASA_1.0.x|Migrer de MTA:Race à MTA:SA 1.0.x]] ( Traduction: [http://wiki.multitheftauto.com/wiki/User:Rouche Rouche] )&lt;br /&gt;
* [[fr/A propos des Map|A propos des Map]] ( Traduction: [http://wiki.multitheftauto.com/wiki/User:Rouche Rouche] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Programmer====&lt;br /&gt;
&lt;br /&gt;
* [[fr/Introduction_Programmation|Introduction: La programmation]] ( Traduction: [http://wiki.multitheftauto.com/wiki/User:Citizen Citizen] )&lt;br /&gt;
* [[fr/Introduction_GUI|Introduction: Le GUI]] ( Traduction: [http://wiki.multitheftauto.com/wiki/User:FatalTeror FatalTerror] )&lt;br /&gt;
* [[fr/Debugage|Tutoriel: Le débugage]] - Comment trouver les erreurs dans son script(Traduction:[http://wiki.multitheftauto.com/wiki/User:Vincenzo] alias Vincentdu90)&lt;br /&gt;
* [[fr/Ressources|Introduction: Les ressources]]&lt;br /&gt;
** [[fr/Ressource_Acces_Internet|Introduction: L'accès internet]] - Comment créer un site à partir d'une ressource&lt;br /&gt;
** [[:Category:Resource|Catalogue des ressources]]&lt;br /&gt;
** [[fr/Meta.xml|Meta.xml]] - Derière chaque ressource ce trouve une meta pour la définir&lt;br /&gt;
** [[fr/ACL|ACL]] - Access Control List, pour définir les autorisations&lt;br /&gt;
* [[fr/Ecrire_Gamemode|Créer un gamemode]]&lt;br /&gt;
* [[fr/Fonctions_Utiles|Fonctions Utiles]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Bases de données====&lt;br /&gt;
Cette section décrit toutes les capacités fournient par le LUA/MTA ou par les ressources.&lt;br /&gt;
* [[:Category:Resource|Catalogue des ressources]] - Vous devez le lire pour faire un script appropriés&lt;br /&gt;
* [[fr/Les_scripts_clients| Les scripts clients]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Aide générale du LUA====&lt;br /&gt;
Des pages conçues pour aider votre compréhension du Lua&lt;br /&gt;
*[http://www.lua.org/pil/index.html &amp;quot;Programming in Lua&amp;quot;]&lt;br /&gt;
**[http://www.lua.org/manual/5.1/#index Les fonctions Lua]&lt;br /&gt;
*[http://lua-users.org/wiki/TutorialDirectory wiki Lua]&lt;br /&gt;
*[http://nixstaller.berlios.de/manual/0.2/nixstaller_9.html Un guide général au Lua de Nixstaller]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Map Editor====&lt;br /&gt;
*[[Resource:Editor|Manuel]]&lt;br /&gt;
*[[Resource:Editor/EDF|Editor Definition Format]]&lt;br /&gt;
*[[Resource:Editor/Plugins|Plugins]]&lt;br /&gt;
*[[Resource:Editor#FAQ|Questions Fréquentes]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Développer Multi Theft Auto====&lt;br /&gt;
* [[fr/Compiler_MTASA|Compiler MTASA sur Windows]]&lt;br /&gt;
* [[fr/Compiler_MTASA_Server_sur_Mac_OS_X|Compiler MTASA sur Mac OS X]]&lt;br /&gt;
* [[fr/Compiler_MTASA_Server_sur_GNU_Linux|Compiler MTASA sur GNU/Linux]]&lt;br /&gt;
* [[fr/Directives_de_codage|Directives de codage]]&lt;br /&gt;
* [http://code.google.com/p/mtasa-blue Google Code SVN]&lt;br /&gt;
* [[fr/Roadmap|Roadmap]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px; background:#CCCCFF;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Références====&lt;br /&gt;
* [[fr/Fonctions_Clients|Fonctions Clients]]&lt;br /&gt;
* [[fr/Events_Clients|Events Clients]]&lt;br /&gt;
* [[fr/Fonctions_Serveurs|Fonctions Clients]]&lt;br /&gt;
* [[fr/Events_Serveurs|Events Clients]]&lt;br /&gt;
&amp;lt;!-- Incomplet * [[Module functions|Server-side external module scripting functions list]] --&amp;gt;&lt;br /&gt;
* [[fr/MTA Classes]] - Les descriptions détaillées de tous les types personnalisés MTA&lt;br /&gt;
** [[fr/Element|MTA Elements]] / [[Element tree]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====[[Id|ID Listes]]====&lt;br /&gt;
*[[fr/Animations|Animations]]&lt;br /&gt;
*[[fr/Skins_Personnages|Skins Personnages]]&lt;br /&gt;
*[[fr/Vetements_CJ|Vêtements CJ]]&lt;br /&gt;
*[[fr/Garage|Garage IDs]]&lt;br /&gt;
*[[fr/Interieurs_IDs|Intérieurs IDs]]&lt;br /&gt;
*[[fr/Materiel_IDs|Matériel IDs]]&lt;br /&gt;
*[[fr/Projectiles|Projectiles]]&lt;br /&gt;
*[[fr/Radar Blips]]&lt;br /&gt;
*[[fr/Sons|Sons]]&lt;br /&gt;
*[[fr/Vehicule_IDs|ID des véhicules]]&lt;br /&gt;
*[[fr/Vehicule_Couleurs|Couleurs véhicules]]&lt;br /&gt;
*[[fr/Vehicule_Upgrades|Tuning IDs]]&lt;br /&gt;
*[[fr/Armes|Armes]]&lt;br /&gt;
*[[fr/Meteos|Météos]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
|}&lt;br /&gt;
[[pl:Main Page]]&lt;br /&gt;
[[ru:Main Page]]&lt;br /&gt;
[[it:Pagina principale]]&lt;br /&gt;
[[nl:Main Page]]&lt;br /&gt;
[[de:Hauptseite]]&lt;br /&gt;
[[es:Pagina Principal]]&lt;/div&gt;</summary>
		<author><name>Vincenzo</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Page_d%27accueil&amp;diff=28829</id>
		<title>Page d'accueil</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Page_d%27accueil&amp;diff=28829"/>
		<updated>2011-12-26T01:30:58Z</updated>

		<summary type="html">&lt;p&gt;Vincenzo: /* Programmer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;background: #FFEEAA; padding: 5px; float:right; width: 30%;&amp;quot;&amp;gt;Dernière version stable de '''Multi Theft Auto: San Andreas''' est '''{{Current Version|full}}'''. Rendez-vous sur la [http://mtasa.com/ page principale] pour la télécharger.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Vous pouvez aussi télécharger une [http://nightly.mtasa.com/ beta] pour avoir la dernière version ( non stable ).&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
Bienvenue sur le wiki de Multi Theft Auto. Sur ce wiki, vous trouverez des tas d'informations sur Multi Theft Auto.&lt;br /&gt;
&lt;br /&gt;
Il y a [[How you can help|différents moyens de nous aider]]: créer une map, un gamemode, rediger des articles sur des fonctions, écrire un exemple, écrire un tutorial ou juste jouer à MTA et nous rapportez les bugs trouvés.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
====Pour commencer====&lt;br /&gt;
&lt;br /&gt;
* [[fr/Manuel_Client|Manuel Client]] ( Traduction: [http://wiki.multitheftauto.com/wiki/User:DrawKiie DrawKiie] )&lt;br /&gt;
* [[fr/Manuel_Serveur|Manuel Serveur]] ( Traduction: [http://wiki.multitheftauto.com/wiki/User:Rouche Rouche] )&lt;br /&gt;
* [[fr/Problemes_connus|Problèmes connus]] ( Traduction: [http://wiki.multitheftauto.com/wiki/User:Rouche Rouche] )&lt;br /&gt;
* [[fr/Migrer_de_MTARace_a_MTASA_1.0.x|Migrer de MTA:Race à MTA:SA 1.0.x]] ( Traduction: [http://wiki.multitheftauto.com/wiki/User:Rouche Rouche] )&lt;br /&gt;
* [[fr/A propos des Map|A propos des Map]] ( Traduction: [http://wiki.multitheftauto.com/wiki/User:Rouche Rouche] )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Programmer====&lt;br /&gt;
&lt;br /&gt;
* [[fr/Introduction_Programmation|Introduction: La programmation]] ( Traduction: [http://wiki.multitheftauto.com/wiki/User:Citizen Citizen] )&lt;br /&gt;
* [[fr/Introduction_GUI|Introduction: Le GUI]] ( Traduction: [http://wiki.multitheftauto.com/wiki/User:FatalTeror FatalTerror] )&lt;br /&gt;
* [[fr/Debugage|Tutoriel: Le débugage]] - Comment trouver les erreurs dans son script[Vincenzo alias Vincentdu90]&lt;br /&gt;
* [[fr/Ressources|Introduction: Les ressources]]&lt;br /&gt;
** [[fr/Ressource_Acces_Internet|Introduction: L'accès internet]] - Comment créer un site à partir d'une ressource&lt;br /&gt;
** [[:Category:Resource|Catalogue des ressources]]&lt;br /&gt;
** [[fr/Meta.xml|Meta.xml]] - Derière chaque ressource ce trouve une meta pour la définir&lt;br /&gt;
** [[fr/ACL|ACL]] - Access Control List, pour définir les autorisations&lt;br /&gt;
* [[fr/Ecrire_Gamemode|Créer un gamemode]]&lt;br /&gt;
* [[fr/Fonctions_Utiles|Fonctions Utiles]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Bases de données====&lt;br /&gt;
Cette section décrit toutes les capacités fournient par le LUA/MTA ou par les ressources.&lt;br /&gt;
* [[:Category:Resource|Catalogue des ressources]] - Vous devez le lire pour faire un script appropriés&lt;br /&gt;
* [[fr/Les_scripts_clients| Les scripts clients]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Aide générale du LUA====&lt;br /&gt;
Des pages conçues pour aider votre compréhension du Lua&lt;br /&gt;
*[http://www.lua.org/pil/index.html &amp;quot;Programming in Lua&amp;quot;]&lt;br /&gt;
**[http://www.lua.org/manual/5.1/#index Les fonctions Lua]&lt;br /&gt;
*[http://lua-users.org/wiki/TutorialDirectory wiki Lua]&lt;br /&gt;
*[http://nixstaller.berlios.de/manual/0.2/nixstaller_9.html Un guide général au Lua de Nixstaller]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Map Editor====&lt;br /&gt;
*[[Resource:Editor|Manuel]]&lt;br /&gt;
*[[Resource:Editor/EDF|Editor Definition Format]]&lt;br /&gt;
*[[Resource:Editor/Plugins|Plugins]]&lt;br /&gt;
*[[Resource:Editor#FAQ|Questions Fréquentes]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Développer Multi Theft Auto====&lt;br /&gt;
* [[fr/Compiler_MTASA|Compiler MTASA sur Windows]]&lt;br /&gt;
* [[fr/Compiler_MTASA_Server_sur_Mac_OS_X|Compiler MTASA sur Mac OS X]]&lt;br /&gt;
* [[fr/Compiler_MTASA_Server_sur_GNU_Linux|Compiler MTASA sur GNU/Linux]]&lt;br /&gt;
* [[fr/Directives_de_codage|Directives de codage]]&lt;br /&gt;
* [http://code.google.com/p/mtasa-blue Google Code SVN]&lt;br /&gt;
* [[fr/Roadmap|Roadmap]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px; background:#CCCCFF;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Références====&lt;br /&gt;
* [[fr/Fonctions_Clients|Fonctions Clients]]&lt;br /&gt;
* [[fr/Events_Clients|Events Clients]]&lt;br /&gt;
* [[fr/Fonctions_Serveurs|Fonctions Clients]]&lt;br /&gt;
* [[fr/Events_Serveurs|Events Clients]]&lt;br /&gt;
&amp;lt;!-- Incomplet * [[Module functions|Server-side external module scripting functions list]] --&amp;gt;&lt;br /&gt;
* [[fr/MTA Classes]] - Les descriptions détaillées de tous les types personnalisés MTA&lt;br /&gt;
** [[fr/Element|MTA Elements]] / [[Element tree]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====[[Id|ID Listes]]====&lt;br /&gt;
*[[fr/Animations|Animations]]&lt;br /&gt;
*[[fr/Skins_Personnages|Skins Personnages]]&lt;br /&gt;
*[[fr/Vetements_CJ|Vêtements CJ]]&lt;br /&gt;
*[[fr/Garage|Garage IDs]]&lt;br /&gt;
*[[fr/Interieurs_IDs|Intérieurs IDs]]&lt;br /&gt;
*[[fr/Materiel_IDs|Matériel IDs]]&lt;br /&gt;
*[[fr/Projectiles|Projectiles]]&lt;br /&gt;
*[[fr/Radar Blips]]&lt;br /&gt;
*[[fr/Sons|Sons]]&lt;br /&gt;
*[[fr/Vehicule_IDs|ID des véhicules]]&lt;br /&gt;
*[[fr/Vehicule_Couleurs|Couleurs véhicules]]&lt;br /&gt;
*[[fr/Vehicule_Upgrades|Tuning IDs]]&lt;br /&gt;
*[[fr/Armes|Armes]]&lt;br /&gt;
*[[fr/Meteos|Météos]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
|}&lt;br /&gt;
[[pl:Main Page]]&lt;br /&gt;
[[ru:Main Page]]&lt;br /&gt;
[[it:Pagina principale]]&lt;br /&gt;
[[nl:Main Page]]&lt;br /&gt;
[[de:Hauptseite]]&lt;br /&gt;
[[es:Pagina Principal]]&lt;/div&gt;</summary>
		<author><name>Vincenzo</name></author>
	</entry>
</feed>