• 03 Juillet 2025, 09:08:55


Auteur Sujet: Probléme interminable - Gm oakland gangwars  (Lu 1645 fois)

0 Membres et 1 Invité sur ce sujet

Hors ligne vitry_selkato

  • *
  • Tueur en série
  • Thug Life Style - Vie de voyous Virtuel
  • Messages: 174
    • Voir le profil
    • http://www.thuglifestyle.1x.net/
Probléme interminable - Gm oakland gangwars
« le: 02 Août 2011, 16:10:33 »
C:\Documents and Settings\Sèlim\Bureau\SERVEUR SA-MP\gamemodes\OaklandGangWars.pwn(489) : error 033: array must be indexed (variable "playerCheckpoint")
C:\Documents and Settings\Sèlim\Bureau\SERVEUR SA-MP\gamemodes\OaklandGangWars.pwn(489) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Sèlim\Bureau\SERVEUR SA-MP\gamemodes\OaklandGangWars.pwn(489) : error 017: undefined symbol "playerid"
C:\Documents and Settings\Sèlim\Bureau\SERVEUR SA-MP\gamemodes\OaklandGangWars.pwn(489) : fatal error 107: too many error messages on one line
public getCheckpointType( playerID ) {
return checkpointType[ playerCheckpoint][playerid];
}

 >:(

Hors ligne Xartrick

  • *
  • C & Pawn Programmer
  • Messages: 1391
    • Voir le profil
    • Xartrick's Area
Re : Probléme interminable - Gm oakland gangwars
« Réponse #1 le: 02 Août 2011, 16:16:23 »
C:\Documents and Settings\Sèlim\Bureau\SERVEUR SA-MP\gamemodes\OaklandGangWars.pwn(489) : error 017: undefined symbol "playerid"
Les noms des variables sont sensibles à la casse !

public getCheckpointType(playerID)
{
    return checkpointType[playerCheckpoint][playerID];
}

Ensuite, montre nous les déclarations de checkpointType et de playerCheckpoint ainsi que leurs valeurs.

Hors ligne vitry_selkato

  • *
  • Tueur en série
  • Thug Life Style - Vie de voyous Virtuel
  • Messages: 174
    • Voir le profil
    • http://www.thuglifestyle.1x.net/
Re : Probléme interminable - Gm oakland gangwars
« Réponse #2 le: 02 Août 2011, 16:21:40 »
forward getCheckpointType( playerID );

new playerCheckpoint[ SLOTS ];
public checkpointUpdate( )
{
for(new i=0; i<SLOTS; i++)
{
    if(IsPlayerConnected(i)) {
        for(new j=0; j < MAX_POINTS; j++) {
            if(isPlayerInArea(i, checkCoords[j])) {
                if(playerCheckpoint[i]!=j) {
                    DisablePlayerCheckpoint(i);
SetPlayerCheckpoint(i, checkpoints[j][0],checkpoints[j][1],checkpoints[j][2],checkpoints[j][3]);
playerCheckpoint[i] = j;
}
            } else {
            if(playerCheckpoint[i]==j) {
                DisablePlayerCheckpoint(i);
                playerCheckpoint[i] = 999;
              }
            }
        }
}
}
}

public checkpointUpdate( )
{
for(new i=0; i<SLOTS; i++)
{
    if(IsPlayerConnected(i)) {
        for(new j=0; j < MAX_POINTS; j++) {
            if(isPlayerInArea(i, checkCoords[j])) {
                if(playerCheckpoint[i]!=j) {
                    DisablePlayerCheckpoint(i);
SetPlayerCheckpoint(i, checkpoints[j][0],checkpoints[j][1],checkpoints[j][2],checkpoints[j][3]);
playerCheckpoint[i] = j;
}
            } else {
            if(playerCheckpoint[i]==j) {
                DisablePlayerCheckpoint(i);
                playerCheckpoint[i] = 999;
              }
            }
        }
}
}
}
rien d'autre
« Modifié: 02 Août 2011, 16:26:29 par vitry_selkato »

Hors ligne Xartrick

  • *
  • C & Pawn Programmer
  • Messages: 1391
    • Voir le profil
    • Xartrick's Area
Re : Probléme interminable - Gm oakland gangwars
« Réponse #3 le: 02 Août 2011, 16:35:05 »
playerCheckpoint est un tableau, mais tu ne l'utilise pas comme tel, tu l'utilise comme une simple variable.
Ensuite, je n'ai rien sur checkpointType !

Hors ligne vitry_selkato

  • *
  • Tueur en série
  • Thug Life Style - Vie de voyous Virtuel
  • Messages: 174
    • Voir le profil
    • http://www.thuglifestyle.1x.net/
Re : Probléme interminable - Gm oakland gangwars
« Réponse #4 le: 02 Août 2011, 17:55:30 »
Je ne voit pas comment réglés le probléme,

Ensuite :

new checkpointType[ MAX_POINTS ] = {
CP_AMMU,
CP_AMMU_2,
CP_AMMU_3,
CP_AMMU_4,
CP_AMMU_5,
CP_LSAP,
CP_LVAP,
CP_SFAP,
CP_LSTS,
CP_LVTS,
CP_SFTS
};
forward getCheckpointType( playerID );
public getCheckpointType( playerID ) {
return checkpointType[ playerCheckpoint][playerid];
}

Hors ligne Xartrick

  • *
  • C & Pawn Programmer
  • Messages: 1391
    • Voir le profil
    • Xartrick's Area
Re : Probléme interminable - Gm oakland gangwars
« Réponse #5 le: 02 Août 2011, 17:58:41 »
Quelle est la valeur de SLOTS ?
Sinon, avec ce que tu m'as donné, j'imagine ce code.


public getCheckpointType(playerid)
{
    return checkpointType[playerCheckpoint[playerid]];
}

Hors ligne vitry_selkato

  • *
  • Tueur en série
  • Thug Life Style - Vie de voyous Virtuel
  • Messages: 174
    • Voir le profil
    • http://www.thuglifestyle.1x.net/
Re : Probléme interminable - Gm oakland gangwars
« Réponse #6 le: 03 Août 2011, 11:46:16 »
La parcontre j'ai 7 érreur
C:\Documents and Settings\Sèlim\Bureau\SERVEUR SA-MP\gamemodes\OaklandGangWars.pwn(487) : error 025: function heading differs from prototype
C:\Documents and Settings\Sèlim\Bureau\SERVEUR SA-MP\gamemodes\OaklandGangWars.pwn(541) : error 021: symbol already defined: "checkpointUpdate"
C:\Documents and Settings\Sèlim\Bureau\SERVEUR SA-MP\gamemodes\OaklandGangWars.pwn(582) : error 035: argument type mismatch (argument 2)
C:\Documents and Settings\Sèlim\Bureau\SERVEUR SA-MP\gamemodes\OaklandGangWars.pwn(623) : error 017: undefined symbol "label"
C:\Documents and Settings\Sèlim\Bureau\SERVEUR SA-MP\gamemodes\OaklandGangWars.pwn(623) : warning 215: expression has no effect
C:\Documents and Settings\Sèlim\Bureau\SERVEUR SA-MP\gamemodes\OaklandGangWars.pwn(623) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Sèlim\Bureau\SERVEUR SA-MP\gamemodes\OaklandGangWars.pwn(623) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Sèlim\Bureau\SERVEUR SA-MP\gamemodes\OaklandGangWars.pwn(623) : fatal error 107: too many error messages on one line

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


7 Errors.

:wall

Hors ligne Xartrick

  • *
  • C & Pawn Programmer
  • Messages: 1391
    • Voir le profil
    • Xartrick's Area
Re : Probléme interminable - Gm oakland gangwars
« Réponse #7 le: 03 Août 2011, 15:46:32 »
Merci de lire mon message en entier ...
Quelle est la valeur de SLOTS ?