GTAOnline.net
San Andreas Multiplayer (sa:mp) => Scripting SA-MP [Pawn center] => Discussion démarrée par: Arsatisse le 08 Septembre 2010, 14:04:29
-
Bonjour !
Je vous pose encore mon petit problème :lmfao
enfaite je voulais faire 2 equipes , donc j'ai suivis ce magnifique tuto :
http://wiki.sa-mp.com/wiki/PAWN_tutorial (http://wiki.sa-mp.com/wiki/PAWN_tutorial) >> Making a team deathmatch
voila ,
donc je fais tout correctement (oui oui je vous assure ^^)
mais une erreure me resort
C:\Users\Public\GTA Serveur\0.3b\gamemodes\bare.pwn(36) : error 017: undefined symbol "gTeam"
C:\Users\Public\GTA Serveur\0.3b\gamemodes\bare.pwn(36) : warning 215: expression has no effect
C:\Users\Public\GTA Serveur\0.3b\gamemodes\bare.pwn(36) : error 001: expected token: ";", but found "]"
C:\Users\Public\GTA Serveur\0.3b\gamemodes\bare.pwn(36) : error 029: invalid expression, assumed zero
C:\Users\Public\GTA Serveur\0.3b\gamemodes\bare.pwn(36) : fatal error 107: too many error messages on one line
donc etant intéligent (non ??? ) et bin si ! ^^
j'ai été voir Lignes 36 :O
voici mes lignes 34 a 43
SetPlayerToTeamColor(playerid)
{
if (gTeam[playerid] == TEAM_ENNEMIS)
{
SetPlayerColor(playerid, TEAM_ENNEMIS_COLOR);
}
else if (gTeam[playerid] == TEAM_POLICE)
{
SetPlayerColor(playerid, TEAM_POLICE_COLOR);
}
j'èspère que vous pourrez m'aider :)
-
Salut ,
merci de ta réponse ,
mais tkt j'y avais déja pensé , mais j'avais rien dit car c'était encore pire O.o
C:UsersPublicGTA Serveur�.3bgamemodesare.pwn(57) : error 029: invalid expression, assumed zero
C:UsersPublicGTA Serveur�.3bgamemodesare.pwn(57) : error 004: function "OnPlayerEnterVehicle" is not implemented
C:UsersPublicGTA Serveur�.3bgamemodesare.pwn(60) : error 017: undefined symbol "vehicleid"
C:UsersPublicGTA Serveur�.3bgamemodesare.pwn(62) : error 017: undefined symbol "vehicleid"
C:UsersPublicGTA Serveur�.3bgamemodesare.pwn(65) : error 079: inconsistent return types (array & non-array)
C:UsersPublicGTA Serveur�.3bgamemodesare.pwn(68) : warning 225: unreachable code
C:UsersPublicGTA Serveur�.3bgamemodesare.pwn(68) : error 029: invalid expression, assumed zero
C:UsersPublicGTA Serveur�.3bgamemodesare.pwn(68) : error 004: function "OnPlayerConnect" is not implemented
C:UsersPublicGTA Serveur�.3bgamemodesare.pwn(87) : error 079: inconsistent return types (array & non-array)
C:UsersPublicGTA Serveur�.3bgamemodesare.pwn(90) : warning 225: unreachable code
C:UsersPublicGTA Serveur�.3bgamemodesare.pwn(90) : error 029: invalid expression, assumed zero
C:UsersPublicGTA Serveur�.3bgamemodesare.pwn(90) : error 004: function "OnPlayerDisconnect" is not implemented
C:UsersPublicGTA Serveur�.3bgamemodesare.pwn(97) : error 079: inconsistent return types (array & non-array)
C:UsersPublicGTA Serveur�.3bgamemodesare.pwn(99) : warning 225: unreachable code
C:UsersPublicGTA Serveur�.3bgamemodesare.pwn(99) : error 029: invalid expression, assumed zero
C:UsersPublicGTA Serveur�.3bgamemodesare.pwn(99) : error 004: function "OnPlayerCommandText" is not implemented
C:UsersPublicGTA Serveur�.3bgamemodesare.pwn(104) : error 017: undefined symbol "strtok"
C:UsersPublicGTA Serveur�.3bgamemodesare.pwn(104) : error 033: array must be indexed (variable "cmd")
C:UsersPublicGTA Serveur�.3bgamemodesare.pwn(107) : error 079: inconsistent return types (array & non-array)
C:UsersPublicGTA Serveur�.3bgamemodesare.pwn(110) : error 079: inconsistent return types (array & non-array)
C:UsersPublicGTA Serveur�.3bgamemodesare.pwn(101) : warning 225: unreachable code
C:UsersPublicGTA Serveur�.3bgamemodesare.pwn(114) : error 029: invalid expression, assumed zero
C:UsersPublicGTA Serveur�.3bgamemodesare.pwn(114) : error 004: function "OnPlayerSpawn" is not implemented
C:UsersPublicGTA Serveur�.3bgamemodesare.pwn(124) : error 079: inconsistent return types (array & non-array)
C:UsersPublicGTA Serveur�.3bgamemodesare.pwn(128) : warning 225: unreachable code
C:UsersPublicGTA Serveur�.3bgamemodesare.pwn(128) : error 029: invalid expression, assumed zero
C:UsersPublicGTA Serveur�.3bgamemodesare.pwn(128) : error 004: function "OnPlayerDeath" is not implemented
C:UsersPublicGTA Serveur�.3bgamemodesare.pwn(130) : error 017: undefined symbol "killerid"
C:UsersPublicGTA Serveur�.3bgamemodesare.pwn(130) : error 017: undefined symbol "killerid"
C:UsersPublicGTA Serveur�.3bgamemodesare.pwn(132) : error 017: undefined symbol "killerid"
C:UsersPublicGTA Serveur�.3bgamemodesare.pwn(133) : error 079: inconsistent return types (array & non-array)
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
26 Errors.
-
Salut, je suis pas sûr mais tes fonctions SetPlayerTeamFromClass(playerid, classid) et SetPlayerToTeamColor(playerid) ne sont pas annoncées.
Essaye de mettre :
forward SetPlayerTeamFromClass(playerid, classid);
forward SetPlayerToTeamColor(playerid);
Sous tes variables globales.
++
-
Change rien .. :S
, mais si j'essayais de faire le script dans un filterscripts et pas dans mon GameMode :?
Il n'aurait pas de problème avec les autres scripts stil VehicleID , OnPlayerEnterVehicle etc... :?
(je vais essayer je vous tiens au courant ;)
Double post
ok ... enfaite j'ai pigé :p
SetPlayerToTeamColor(playerid)
{
if (TEST[playerid] == TEAM_ENNEMIS)
{
SetPlayerColor(playerid, TEAM_ENNEMIS_COLOR);
}
else if (TEST[playerid] == TEAM_POLICE)
{
SetPlayerColor(playerid, TEAM_POLICE_COLOR);
}
j'avais oublié le } final XD
-
ps : Petit rappel, 26 erreurs correspondent à une mauvaise fermeture de CallBack.
-
quand on y pense x) c'est une petite erreure de manipulation ,
mais qui ne fait pas d'erreur ,n'apprend rien :) :cheers