• 06 Juin 2026, 08:21:30


Auteur Sujet: FS Traduction Probleme ... aide SVP merci ...  (Lu 2860 fois)

0 Membres et 1 Invité sur ce sujet

Hors ligne xEagl3Zx

  • *
  • Grand Banditisme
  • drift ...
  • Messages: 504
    • Voir le profil
FS Traduction Probleme ... aide SVP merci ...
« le: 10 Septembre 2009, 12:47:03 »
Salut voila mon probleme ...

Errors :
C:Documents and SettingsAurélienBureauserver 1filterscripts rad.pwn(6) : warning 203: symbol is never used: "GoogleTranslate"
C:Documents and SettingsAurélienBureauserver 1filterscripts rad.pwn(6 -- 40) : error 013: no entry point (no public functions)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

Script :
//googletranslate.inc
//by 0rb (yom)
//26-04-09 14:06

GoogleTranslate(text[], from[], to[], size = sizeof text)
{
new
tmp[384],
idx = -1,
pos

;

while (text[++idx])
{
switch (text[idx])
{
case ' ' : tmp[idx] = '+';
default  : tmp[idx] = text[idx];
}
}

format(tmp, sizeof tmp, "http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=%s&langpair=%s%%7C%s", tmp, from, to);
pwncurl_get(tmp, tmp, sizeof tmp);
  pos = strfind(tmp,"ext":"");
 
  if (pos != -1)
  {
strdel(tmp, 0, pos + 6);
strdel(tmp, strfind(tmp, ""}, "res"), sizeof tmp);
else
{
format(tmp, size, text);
}

return tmp;
}
..:: Vive le drift ... ::..[/u]



++TZ++

Hors ligne FuSion

  • Pawn coder
  • *
  • Grand Banditisme
  • for(new i = 0; i < INFINI; i++)
  • Messages: 888
    • Voir le profil
Re : FS Traduction Probleme ... aide SVP merci ...
« Réponse #1 le: 10 Septembre 2009, 13:01:44 »
Traduit avec google traduction ?  ???


++
FS'

Hors ligne Ssk

  • *
  • Lulu's Stunt - Le serveur stunt de Lulu !
  • Messages: 8154
    • Voir le profil
Re : FS Traduction Probleme ... aide SVP merci ...
« Réponse #2 le: 10 Septembre 2009, 13:08:53 »
en faites ajoute cette fonction sur ton gm ( a la fin)

GoogleTranslate(text[], from[], to[], size = sizeof text)
{
new
tmp[384],
idx = -1,
pos

;

while (text[++idx])
{
switch (text[idx])
{
case ' ' : tmp[idx] = '+';
default  : tmp[idx] = text[idx];
}
}

format(tmp, sizeof tmp, "http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=%s&langpair=%s%%7C%s", tmp, from, to);
pwncurl_get(tmp, tmp, sizeof tmp);
  pos = strfind(tmp,"ext":"");
 
  if (pos != -1)
  {
strdel(tmp, 0, pos + 6);
strdel(tmp, strfind(tmp, ""}, "res"), sizeof tmp);
else
{
format(tmp, size, text);
}

return tmp;
}

et puis dans une cmd tu integre ca avec tes parametre
GoogleTranslate(text[], from[], to[], size = sizeof text);



Derrière tout programme se cache un programmeur, je considère le monde comme un programme.
Mon blog

Hors ligne MrFredo

  • *
  • Grand Banditisme
  • Scripteur PHP/PAWN
  • Messages: 953
    • Voir le profil
    • GTA-Hosting
Re : FS Traduction Probleme ... aide SVP merci ...
« Réponse #3 le: 10 Septembre 2009, 13:11:02 »
J'ai modifier un peux la fonction car elle me generait des erreur vla la fonction qui marche correctement chez moi:
Code: (pawn) [Sélectionner]
stock GoogleTranslate(text[], from[], to[], size = sizeof(text))
{
new
tmp[384],
idx = -1,
pos
;
while (text[++idx])
{
switch (text[idx])
{
case ' ' : tmp[idx] = '+';
default  : tmp[idx] = text[idx];
}
}
format(tmp, sizeof tmp, "http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=%s&langpair=%s%%7C%s", tmp, from, to);
pwncurl_get(tmp, tmp, sizeof tmp);
pos = strfind(tmp,"ext\":\"");
  if (pos != -1)
{
strdel(tmp, 0, pos + 6);
strdel(tmp, strfind(tmp, "\"}, \"res"), sizeof tmp);
}
else
{
format(tmp, size, text);
}
return tmp;
}

Hors ligne xEagl3Zx

  • *
  • Grand Banditisme
  • drift ...
  • Messages: 504
    • Voir le profil
Re : FS Traduction Probleme ... aide SVP merci ...
« Réponse #4 le: 10 Septembre 2009, 18:46:24 »
Je peut savoir la commande ??

Double post
Rrrr Lol Aucune personne veut me repondre ou que se soit ...
« Modifié: 10 Septembre 2009, 19:58:26 par xTig3rZx »
..:: Vive le drift ... ::..[/u]



++TZ++

Hors ligne Syg

  • Expert programmeur C/C++/PAWN
  • *
  • The GTAOnline Jesus
  • Messages: 3908
    • Voir le profil
Re : FS Traduction Probleme ... aide SVP merci ...
« Réponse #5 le: 11 Septembre 2009, 12:01:21 »
warning 203: symbol is never used: "GoogleTranslate" : Veut dire que la fonction GoogleTranslate n'est jamais utilisée dans ton script (rad.pwn) mais qu'elle a été déclarée.
Solution :
Soit tu l'utilises dans une commande ou une autre fonction, soit tu fais précéder sa déclaration pas la mot clé stock comme te l'a montré MrFredo.

error 013: no entry point (no public functions) : Le compilateur ne trouve pas le point d'entrée (fonction principale) de ton gamemode.
Solution :
Tu as certainement oublié d'inclure a_samp.inc au début de ton gamemode
#include <a_samp>
NB : La fonction GoogleTranslate en elle même est correcte (même si la version de MrFredo est mieux).

++
Syg
Courtesy of GtaManiac

Hors ligne xEagl3Zx

  • *
  • Grand Banditisme
  • drift ...
  • Messages: 504
    • Voir le profil
Re : FS Traduction Probleme ... aide SVP merci ...
« Réponse #6 le: 11 Septembre 2009, 12:08:19 »
Euh Merci mais ... Comment je traduit en jeu exemple /trad en f hello => Trad : Salut ( bonjour ) or /trad en a Salut => Trad : Hello ... ?? Merci ... de m'aidez ...

++TZ++
..:: Vive le drift ... ::..[/u]



++TZ++

Hors ligne Syg

  • Expert programmeur C/C++/PAWN
  • *
  • The GTAOnline Jesus
  • Messages: 3908
    • Voir le profil
Re : FS Traduction Probleme ... aide SVP merci ...
« Réponse #7 le: 11 Septembre 2009, 12:17:11 »
Regarde le post de sasuke78200, il te montre comment utiliser cette fonction.

++
Syg
Courtesy of GtaManiac

Hors ligne xEagl3Zx

  • *
  • Grand Banditisme
  • drift ...
  • Messages: 504
    • Voir le profil
Re : FS Traduction Probleme ... aide SVP merci ...
« Réponse #8 le: 11 Septembre 2009, 18:06:59 »
Je comprend pas ... u_u ...
..:: Vive le drift ... ::..[/u]



++TZ++

Hors ligne Ssk

  • *
  • Lulu's Stunt - Le serveur stunt de Lulu !
  • Messages: 8154
    • Voir le profil
Re : FS Traduction Probleme ... aide SVP merci ...
« Réponse #9 le: 11 Septembre 2009, 18:16:18 »
Dans une commande tu met cette ligne avec tes parametres a toi


GoogleTranslate(text[], from[], to[], size = sizeof text);

par exemple

new str[128];
new Output[128];
GoogleTranslate(str,"Bonjour",Output, sizeof(str));



Derrière tout programme se cache un programmeur, je considère le monde comme un programme.
Mon blog

Hors ligne xEagl3Zx

  • *
  • Grand Banditisme
  • drift ...
  • Messages: 504
    • Voir le profil
Re : FS Traduction Probleme ... aide SVP merci ...
« Réponse #10 le: 11 Septembre 2009, 18:22:48 »
Reuh ...

Errors:
C:\DOCUME~1\AURLIE~1\Bureau\SERVER~1\GAMEMO~1\drift1.pwn(2076) : warning 217: loose indentation
C:\DOCUME~1\AURLIE~1\Bureau\SERVER~1\GAMEMO~1\drift1.pwn(2080) : error 017: undefined symbol "text"
C:\DOCUME~1\AURLIE~1\Bureau\SERVER~1\GAMEMO~1\drift1.pwn(2080) : error 001: expected token: ",", but found "sizeof"
C:\DOCUME~1\AURLIE~1\Bureau\SERVER~1\GAMEMO~1\drift1.pwn(2080) : error 017: undefined symbol "text"
C:\DOCUME~1\AURLIE~1\Bureau\SERVER~1\GAMEMO~1\drift1.pwn(2080) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.

Script :
  if(strcmp(cmdtext, "/trad", true, 5) == 0)
{
                                new str[128];
new Output[128];
                                GoogleTranslate(text[], from[], to[], size = sizeof(text))
return 1;
}

..:: Vive le drift ... ::..[/u]



++TZ++

Hors ligne Ssk

  • *
  • Lulu's Stunt - Le serveur stunt de Lulu !
  • Messages: 8154
    • Voir le profil
Re : FS Traduction Probleme ... aide SVP merci ...
« Réponse #11 le: 11 Septembre 2009, 18:28:47 »
met ca

GoogleTranslate(str,"Bonjour",Output, sizeof(str));
 a la place de ton googletranslate car la tu na pas mis tes parametres



Derrière tout programme se cache un programmeur, je considère le monde comme un programme.
Mon blog

Hors ligne xEagl3Zx

  • *
  • Grand Banditisme
  • drift ...
  • Messages: 504
    • Voir le profil
Re : FS Traduction Probleme ... aide SVP merci ...
« Réponse #12 le: 11 Septembre 2009, 18:34:40 »
Je doit faire sa pour tout les mots ?? ... et ...

Errors :
C:\DOCUME~1\AURLIE~1\Bureau\SERVER~1\GAMEMO~1\drift1.pwn(2227) : error 017: undefined symbol "pwncurl_get"
C:\DOCUME~1\AURLIE~1\Bureau\SERVER~1\GAMEMO~1\drift1.pwn(2227) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

Et il y a rien a cette ligne u_u" ...
..:: Vive le drift ... ::..[/u]



++TZ++

Hors ligne Ssk

  • *
  • Lulu's Stunt - Le serveur stunt de Lulu !
  • Messages: 8154
    • Voir le profil
Re : FS Traduction Probleme ... aide SVP merci ...
« Réponse #13 le: 11 Septembre 2009, 18:52:11 »
ta l' include de pawn_curl ???



Derrière tout programme se cache un programmeur, je considère le monde comme un programme.
Mon blog

Hors ligne xEagl3Zx

  • *
  • Grand Banditisme
  • drift ...
  • Messages: 504
    • Voir le profil
Re : FS Traduction Probleme ... aide SVP merci ...
« Réponse #14 le: 11 Septembre 2009, 18:53:28 »
euh non u_u ><...
..:: Vive le drift ... ::..[/u]



++TZ++