GTAOnline.net
San Andreas Multiplayer (sa:mp) => Scripting SA-MP [Pawn center] => Discussion démarrée par: vitry_selkato 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];
}
>:(
-
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.
-
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
-
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 !
-
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];
}
-
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]];
}
-
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
-
Merci de lire mon message en entier ...
Quelle est la valeur de SLOTS ?