GTAOnline.net
San Andreas Multiplayer (sa:mp) => Scripting SA-MP [Pawn center] => Discussion démarrée par: manathann le 24 Avril 2009, 10:22:03
-
Quand je compile mon GF il se met ces trois "warning" alors que jje l=n'ai jamais touché à ces lignes.
C:\Users\manathannrp\Desktop\Manathann RP\gamemodes\gf.pwn(4200) : warning 209: function "CarTow" should return a value
C:\Users\manathannrp\Desktop\Manathann RP\gamemodes\gf.pwn(4630) : warning 204: symbol is assigned a value that is never used: "tmpcar"
C:\Users\manathannrp\Desktop\Manathann RP\gamemodes\gf.pwn(12080) : warning 219: local variable "string" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
Je ne comprend pas
-
deja dans la ligne 12080 modifie le nom de la variable
string de la commande ou la fonction et la t aura deja un warning en moins
-
new tmpcar; tu doit avoir sa et il ne sert pas
public CarTow il te manque un return dans le public
-
Salut,
tu dois avoir une variable globale (défini en hasut du script en général, il s'agit d'une variable hors de toutes fonction/callback et pouvant être utilisée dans tout le code) qui porte le même nom qu'une variable locale
bref, tu devrais renommer ta variable locale afin d'éviter le conflit de variables.
++Sim++