GTAOnline.net

San Andreas Multiplayer (sa:mp) => Scripting SA-MP [Pawn center] => Discussion démarrée par: lepompier le 21 Juin 2008, 23:49:51

Titre: Correction
Posté par: lepompier le 21 Juin 2008, 23:49:51
Bonjour j'aurai besoin d'une aide j'ai un probleme avec sa
Pouvez vous m'aide svp ?

Ligne ;  970

Code: (cpp) [Sélectionner]
tmp = strtok(cmd, idx);
Et l'erreur et ;

Code: (cpp) [Sélectionner]
C:****\********\*******(970) : error 017: undefined symbol "strtok"

merci d'avance
Titre: Re : Correction
Posté par: [StAfF]MaN le 21 Juin 2008, 23:57:32
Ajoute ça dans ton script :




strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}

new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
Titre: Re : Correction
Posté par: lepompier le 22 Juin 2008, 00:13:22
Merci Man mes apres sa me met sa

Code: (cpp) [Sélectionner]
C:\***\*****************\**********\*****(970) : error 035: argument type mismatch (argument 2)



MODIF ; trouver un mini new qui n'allais pas bien ;) merci a toi staff mAn


bonne nuit :D