GTAOnline.net

San Andreas Multiplayer (sa:mp) => Scripting SA-MP [Pawn center] => Discussion démarrée par: Thomas240 le 26 Juin 2015, 14:36:18

Titre: besoin d'aide
Posté par: Thomas240 le 26 Juin 2015, 14:36:18
bonjour voici mon problème

C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(294 -- 295) : error 076: syntax error in the expression, or invalid function call
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(408) : warning 217: loose indentation
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(435) : error 029: invalid expression, assumed zero
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(435) : error 004: function "OnPlayerEnterCheckpoint" is not implemented
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(440) : warning 225: unreachable code
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(440) : error 029: invalid expression, assumed zero
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(440) : error 004: function "OnPlayerLeaveCheckpoint" is not implemented
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(445) : warning 225: unreachable code
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(445) : error 029: invalid expression, assumed zero
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(445) : error 004: function "OnPlayerEnterRaceCheckpoint" is not implemented
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(450) : warning 225: unreachable code
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(450) : error 029: invalid expression, assumed zero
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(450) : error 004: function "OnPlayerLeaveRaceCheckpoint" is not implemented
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(455) : warning 225: unreachable code
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(455) : error 029: invalid expression, assumed zero
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(455) : error 004: function "OnRconCommand" is not implemented
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(460) : warning 225: unreachable code
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(460) : error 029: invalid expression, assumed zero
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(460) : error 004: function "OnPlayerRequestSpawn" is not implemented
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(465) : warning 225: unreachable code
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(465) : error 029: invalid expression, assumed zero
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(465) : error 004: function "OnObjectMoved" is not implemented
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(470) : warning 225: unreachable code
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(470) : error 029: invalid expression, assumed zero
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(470) : error 004: function "OnPlayerObjectMoved" is not implemented
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(475) : warning 225: unreachable code
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(475) : error 029: invalid expression, assumed zero
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(475) : error 004: function "OnPlayerPickUpPickup" is not implemented
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(480) : warning 225: unreachable code
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(480) : error 029: invalid expression, assumed zero
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(480) : error 004: function "OnVehicleMod" is not implemented
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(485) : warning 225: unreachable code
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(485) : error 029: invalid expression, assumed zero
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(485) : error 004: function "OnVehiclePaintjob" is not implemented
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(490) : warning 225: unreachable code
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(490) : error 029: invalid expression, assumed zero
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(490) : error 004: function "OnVehicleRespray" is not implemented
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(495) : warning 225: unreachable code
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(495) : error 029: invalid expression, assumed zero

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


26 Errors.

voici les ligne


[294 -- 295]   SetPlayerTeamFromClass
return 1;

[408] if(CarCheck == vPolice[1])

[435 à 495]
public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}

public OnRconCommand(cmd[])
{
return 1;
}

public OnPlayerRequestSpawn(playerid)
{
return 1;
}

public OnObjectMoved(objectid)
{
return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}


je vois pas le problème :(

merci d’avance

Cordialement Thomas240
Titre: Re : besoin d'aide
Posté par: Infu le 26 Juin 2015, 14:40:36
Bonjour, le voilà ton problème...

[294 -- 295]   SetPlayerTeamFromClass
return 1;

Bonne journée !
Titre: Re : besoin d'aide
Posté par: Thomas240 le 26 Juin 2015, 14:54:14
Bonjour tu peux développer s'il te plait  je début donc se qui et flagrant pour toi les moins  pour moi.

Cordialement Thomas240
Titre: Re : besoin d'aide
Posté par: Infu le 26 Juin 2015, 15:00:12
Je ne peux pas mieux t'aider que ça :

http://www.gtaonline.net/forums/index.php?topic=11593.0
http://www.gtaonline.fr/forums/index.php/topic,11595.0.html
http://www.gtaonline.fr/forums/index.php/topic,11688.0.html

Si tu ne sais pas écrire une fonction je ne peux pas le faire à ta place, car ça ne t'aidera pas à apprendre si on le fait à ta place.
Titre: Re : besoin d'aide
Posté par: Thomas240 le 26 Juin 2015, 15:06:59
je demande pas a l’écrire a mas place mes a me donner des indice pour le faire si non je napren rien ^^

merci pour ton aide je regarde sa

Cordialement Thomas240
Titre: Re : besoin d'aide
Posté par: Infu le 26 Juin 2015, 15:12:23
Une fois que tu auras lu ces trois sujets, tu comprendras par toi-même. C'est mieux lorsqu'on comprend soit-même :)
Titre: Re : besoin d'aide
Posté par: Thomas240 le 26 Juin 2015, 15:38:18
j'ai renommes par SetPlayerTeam(playerid, 4); sa fonctionne mes j'ai toujours 

C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(440) : warning 217: loose indentation
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(440) : error 029: invalid expression, assumed zero
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(440) : error 004: function "OnPlayerEnterCheckpoint" is not implemented
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(445) : warning 225: unreachable code
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(445) : error 029: invalid expression, assumed zero
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(445) : error 004: function "OnPlayerLeaveCheckpoint" is not implemented
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(450) : warning 225: unreachable code
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(450) : error 029: invalid expression, assumed zero
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(450) : error 004: function "OnPlayerEnterRaceCheckpoint" is not implemented
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(455) : warning 225: unreachable code
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(455) : error 029: invalid expression, assumed zero
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(455) : error 004: function "OnPlayerLeaveRaceCheckpoint" is not implemented
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(460) : warning 225: unreachable code
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(460) : error 029: invalid expression, assumed zero
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(460) : error 004: function "OnRconCommand" is not implemented
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(465) : warning 225: unreachable code
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(465) : error 029: invalid expression, assumed zero
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(465) : error 004: function "OnPlayerRequestSpawn" is not implemented
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(470) : warning 225: unreachable code
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(470) : error 029: invalid expression, assumed zero
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(470) : error 004: function "OnObjectMoved" is not implemented
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(475) : warning 225: unreachable code
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(475) : error 029: invalid expression, assumed zero
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(475) : error 004: function "OnPlayerObjectMoved" is not implemented
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(480) : warning 225: unreachable code
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(480) : error 029: invalid expression, assumed zero
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(480) : error 004: function "OnPlayerPickUpPickup" is not implemented
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(485) : warning 225: unreachable code
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(485) : error 029: invalid expression, assumed zero
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(485) : error 004: function "OnVehicleMod" is not implemented
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(490) : warning 225: unreachable code
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(490) : error 029: invalid expression, assumed zero
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(490) : error 004: function "OnVehiclePaintjob" is not implemented
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(495) : warning 225: unreachable code
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(495) : error 029: invalid expression, assumed zero
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(495) : error 004: function "OnVehicleRespray" is not implemented
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(500) : warning 225: unreachable code
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(500) : error 029: invalid expression, assumed zero
C:\Users\Thomas\Desktop\samp037_svr_R1_win32\pawno\fun.pwn(500) : error 004: function "OnPlayerSelectedMenuRow" is not implemented

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


26 Errors.

et la je comprend pas j'ai rien mis dedans.
Titre: Re : besoin d'aide
Posté par: Infu le 26 Juin 2015, 15:42:41
Montre moi les lignes entre 440 et 500, sur un pastebin.com s'il te plaît.
Titre: Re : besoin d'aide
Posté par: Thomas240 le 26 Juin 2015, 15:45:22
voila http://pastebin.com/B0y4G9qn
Titre: Re : besoin d'aide
Posté par: Infu le 26 Juin 2015, 17:50:14
Les 3 ou 4 lignes juste avant s'il te plaît, je me suis trompé.
Titre: Re : besoin d'aide
Posté par: Thomas240 le 26 Juin 2015, 22:17:31
voila http://pastebin.com/gv8YRmXT

cordialement thomas240
Titre: Re : besoin d'aide
Posté par: S!m le 12 Juillet 2015, 04:42:55
Bonjour,

tu ne trouve pas que tu ouvre beaucoup d'accolade dans ce bout de code?

Regarde un peut le bout suivant et essaie de déterminer ce qui serait logique:

        if(CarCheck == vCivile[0])
        {
                if(gTeam[playerid] != TEAM_CIVILE)
                {
                        SendClientMessage(playerid, 0x33CCFFAA, "Vous n'avez pas les clefs de ce véhicule.");
                        RemovePlayerFromVehicle(playerid); //On fait sortir le joueur si il n'est pas CIVILE.
                        return 1;
                }


        if(CarCheck == vPolice[2])
        {
                if(gTeam[playerid] != TEAM_POLICE)
                {
                        SendClientMessage(playerid, 0x33CCFFAA, "Vous n'avez pas les clefs de ce véhicule.");
                        RemovePlayerFromVehicle(playerid); //On fait sortir le joueur si il n'est pas de la police.
                        return 1;
                }
        }

PS. J'ai refait un peu la séparation et l'indentation pour que ce soit plus clair.

Sim