GTAOnline.net

San Andreas Multiplayer (sa:mp) => Scripting SA-MP [Pawn center] => Discussion démarrée par: v331 le 10 Août 2009, 12:22:53

Titre: petit probleme de menu
Posté par: v331 le 10 Août 2009, 12:22:53
Voila j'ai crer un FS pour l'admin ; c'es un menu : l'ami choisit les phrase a envoer a tous le monde.
Le probleme c'est qu'il y a des fautes beauoup d'erreurs et je ne trouve d'ou ca peut venir. :blink

help svp

fs http://pastebin.gtaonline.fr/pastebin.php?show=650 (http://pastebin.gtaonline.fr/pastebin.php?show=650)
http://pastebin.gtaonline.fr/pastebin.php?show=650 (http://pastebin.gtaonline.fr/pastebin.php?show=650)
Titre: Re : petit probleme de menu
Posté par: MadX le 10 Août 2009, 12:26:49
Bonjour/Au revoir ?

En postant les errors on pourra peut être mieux t'aider.
Titre: Re : petit probleme de menu
Posté par: v331 le 10 Août 2009, 13:47:17
bounjour voila mes erreurs:

C:\Program Files\Rockstar Games\GTA San Andreas\test\Stunt Universe2\filterscripts\course-ad.pwn(56) : warning 217: loose indentation
C:\Program Files\Rockstar Games\GTA San Andreas\test\Stunt Universe2\filterscripts\course-ad.pwn(56) : error 029: invalid expression, assumed zero
C:\Program Files\Rockstar Games\GTA San Andreas\test\Stunt Universe2\filterscripts\course-ad.pwn(56) : error 004: function "OnPlayerCommandText" is not implemented
C:\Program Files\Rockstar Games\GTA San Andreas\test\Stunt Universe2\filterscripts\course-ad.pwn(58) : error 017: undefined symbol "cmdtext"
C:\Program Files\Rockstar Games\GTA San Andreas\test\Stunt Universe2\filterscripts\course-ad.pwn(60) : error 017: undefined symbol "IsNotAdmin"
C:\Program Files\Rockstar Games\GTA San Andreas\test\Stunt Universe2\filterscripts\course-ad.pwn(62) : error 017: undefined symbol "playerid"
C:\Program Files\Rockstar Games\GTA San Andreas\test\Stunt Universe2\filterscripts\course-ad.pwn(63) : error 017: undefined symbol "playerid"
C:\Program Files\Rockstar Games\GTA San Andreas\test\Stunt Universe2\filterscripts\course-ad.pwn(65) : error 029: invalid expression, assumed zero
C:\Program Files\Rockstar Games\GTA San Andreas\test\Stunt Universe2\filterscripts\course-ad.pwn(66) : error 017: undefined symbol "playerid"
C:\Program Files\Rockstar Games\GTA San Andreas\test\Stunt Universe2\filterscripts\course-ad.pwn(68) : warning 217: loose indentation
C:\Program Files\Rockstar Games\GTA San Andreas\test\Stunt Universe2\filterscripts\course-ad.pwn(70) : warning 217: loose indentation
C:\Program Files\Rockstar Games\GTA San Andreas\test\Stunt Universe2\filterscripts\course-ad.pwn(74) : warning 225: unreachable code
C:\Program Files\Rockstar Games\GTA San Andreas\test\Stunt Universe2\filterscripts\course-ad.pwn(74) : error 029: invalid expression, assumed zero
C:\Program Files\Rockstar Games\GTA San Andreas\test\Stunt Universe2\filterscripts\course-ad.pwn(74) : error 004: function "OnPlayerSelectedMenuRow" is not implemented
C:\Program Files\Rockstar Games\GTA San Andreas\test\Stunt Universe2\filterscripts\course-ad.pwn(76) : error 017: undefined symbol "playerid"
C:\Program Files\Rockstar Games\GTA San Andreas\test\Stunt Universe2\filterscripts\course-ad.pwn(79) : error 017: undefined symbol "row"
C:\Program Files\Rockstar Games\GTA San Andreas\test\Stunt Universe2\filterscripts\course-ad.pwn(83) : error 017: undefined symbol "playerid"
C:\Program Files\Rockstar Games\GTA San Andreas\test\Stunt Universe2\filterscripts\course-ad.pwn(87) : error 017: undefined symbol "playerid"
C:\Program Files\Rockstar Games\GTA San Andreas\test\Stunt Universe2\filterscripts\course-ad.pwn(91) : error 017: undefined symbol "playerid"
C:\Program Files\Rockstar Games\GTA San Andreas\test\Stunt Universe2\filterscripts\course-ad.pwn(95) : error 017: undefined symbol "playerid"
C:\Program Files\Rockstar Games\GTA San Andreas\test\Stunt Universe2\filterscripts\course-ad.pwn(99) : error 017: undefined symbol "playerid"
C:\Program Files\Rockstar Games\GTA San Andreas\test\Stunt Universe2\filterscripts\course-ad.pwn(103) : error 017: undefined symbol "playerid"
C:\Program Files\Rockstar Games\GTA San Andreas\test\Stunt Universe2\filterscripts\course-ad.pwn(107) : error 017: undefined symbol "playerid"
C:\Program Files\Rockstar Games\GTA San Andreas\test\Stunt Universe2\filterscripts\course-ad.pwn(111) : error 017: undefined symbol "playerid"
C:\Program Files\Rockstar Games\GTA San Andreas\test\Stunt Universe2\filterscripts\course-ad.pwn(115) : error 017: undefined symbol "playerid"
C:\Program Files\Rockstar Games\GTA San Andreas\test\Stunt Universe2\filterscripts\course-ad.pwn(119) : error 017: undefined symbol "playerid"
C:\Program Files\Rockstar Games\GTA San Andreas\test\Stunt Universe2\filterscripts\course-ad.pwn(123) : error 017: undefined symbol "playerid"
C:\Program Files\Rockstar Games\GTA San Andreas\test\Stunt Universe2\filterscripts\course-ad.pwn(127) : error 017: undefined symbol "playerid"
C:\Program Files\Rockstar Games\GTA San Andreas\test\Stunt Universe2\filterscripts\course-ad.pwn(129) : error 002: only a single statement (or expression) can follow each "case"
C:\Program Files\Rockstar Games\GTA San Andreas\test\Stunt Universe2\filterscripts\course-ad.pwn(129) : error 017: undefined symbol "playerid"

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


26 Errors.
Titre: Re : petit probleme de menu
Posté par: ApocKalipsS le 10 Août 2009, 13:56:22
à la dernière ligne, entre le return 1; et la dernière accolade, rajoute une accolade, il te la manquait ;)
Titre: Re : petit probleme de menu
Posté par: v331 le 10 Août 2009, 17:24:32
merci  ;)
sinon a par cette erreur personne ne peu m'aider ?
Titre: Re : petit probleme de menu
Posté par: Azz45 le 10 Août 2009, 17:49:03
Dans les erreurs ta beaucoup de choses non définie, commence par les définir.
Titre: Re : petit probleme de menu
Posté par: v331 le 10 Août 2009, 20:50:21
je c mais: "playerid" ne se definie pas et quand je le defini ia encorse plus d'erreurs.  ;D ;D ;D ;D
Titre: Re : petit probleme de menu
Posté par: hardcoder le 10 Août 2009, 21:12:12
Commence par indenter ton script. Ensuite seulement, tu trouvera facilement les erreurs dans ton script:

- A chaque fois que tu ouvres une section avec {, tu doit la fermer avec un }. Ta première erreur de compilation est à la ligne 56. Ca veut dire que ton erreur, se trouve soit sur la ligne 56, soit avant.

- Dans un switch, tu ne peut que avoir des cas (les 'case'), ou un 'default' (qui est executé si tout les cas échouent).

- A la ligne 60, tu as mis "IsNotAdmin(playerid);". Je devine que tu voulais mettre "if (IsNotAdmin(playerid))"..


Et n'oublie pas: une bonne indentation te permettra d'éviter beaucoup d'erreur et de temps passé à chercher l'erreur. Personellement j'utilise le style d'intentation Allman (http://en.wikipedia.org/wiki/Indent_style#Allman_style_.28bsd_in_Emacs.29)
Titre: Re : petit probleme de menu
Posté par: v331 le 14 Août 2009, 11:32:41
ok merci , j'ai reussi à regler le probleme  ;)