GTAOnline.net

San Andreas Multiplayer (sa:mp) => Scripting SA-MP [Pawn center] => Discussion démarrée par: Ghetto76 le 09 Septembre 2011, 19:46:14

Titre: Explications concernant un warning [Réglé]
Posté par: Ghetto76 le 09 Septembre 2011, 19:46:14
Salut à tous, donc c'est court, je compile un FS que je modifie, et j'ai sa :

C:\Documents and Settings\Secours\Bureau\SAMP SERVER\filterscripts\administration.pwn(418) : warning 204: symbol is assigned a value that is never used: "String"

Voici les lignes 414 à 430 :

Citer
   if   (!strcmp(Cmd, "/destroyspawncar", true))
   {
        if (Levels[playerid] >= 4)
        {
         new JNom[256], String[256];
         GetPlayerName(playerid, JNom, sizeof(JNom));
         SendClientMessage(playerid, ROUGE, "Vous avez détruit toutes les voitures spawn par le staff.");
           for(new i = 0; i < MAX_VEHICLES; i++)
            {
               if (SpawnCar == 1)
               {
               DestroyVehicle(i);
               }
            }
         }
        return 1;
     }

J'ai rien touché à part les SendClientMessage si je ne me trompe pas, merci de m'aider.
Titre: Re : Explications concernant un warning
Posté par: Ssk le 09 Septembre 2011, 19:55:40
Le problème viens de cette ligne

new JNom[256], String[256];
enfaite tu créer une variable (la variable String) que tu n'utilises jamais donc pour retirer ce warning tu dois retirer la déclaration de String
Titre: Re : Explications concernant un warning
Posté par: Ghetto76 le 09 Septembre 2011, 20:02:52
C'est bizarre j'ai pas touché et au début sa ne faisait rien... J'ai réglé le problème et j'ai honte d'avoir fait ce topoc pour si peu  :-[ Désolé...
Titre: Re : Explications concernant un warning [Réglé]
Posté par: spiirou le 09 Septembre 2011, 21:57:29
Il n'y a pas a avoir honte, on a tous été comme toi au début :)