`MAX_` definitions (or lack thereof) break progressive initializer for arrays
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 38/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Área
- tooling
Línea de trabajo
Locate the include definitions for MAX_WEAPONS and the related WEAPON_ constants, then reproduce the progressive initializer example from the issue. Check whether other tagged MAX_ definitions have the same shape and compare array sizing with the tag values. Done means the relevant MAX_ definitions consistently support initialization of every expected slot without breaking indexed access.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Consider following snippet:
static bool:gIsWeaponAllowed[MAX_WEAPONS] = {true, ...};
public OnGameModeInit()
{
for (new i = 0; i < sizeof gIsWeaponAllowed; i++)
{
printf("%d: %d", i, gIsWeaponAllowed[WEAPON:i]);
}
return 1;
}
One would expect that all slots would be initialized to true, but only the first slot gets set.
[2024-07-27T18:24:52Z] [Info] 0: 1
[2024-07-27T18:24:52Z] [Info] 1: 0
[2024-07-27T18:24:52Z] [Info] 2: 0
...
[2024-07-27T18:24:52Z] [Info] 45: 0
[2024-07-27T18:24:52Z] [Info] 46: 0
Adding an additional
#define MAX_WEAPONS (WEAPON:47)
seems to remedy this problem and still allows the array to be indexed properly with the WEAPON_ definitions. This will probably need to be added for all tagged MAX_ definitions.
- Lenguaje dominante
- Pawn
- Estrellas
- 54
- Forks
- 20
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de openmultiplayer/omp-stdlib
-
Add Player Disconnect Reasons. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
openmultiplayer/omp-stdlib#50 · 1 comentario · 3 reacciones ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 45/100
Todos los issues de openmultiplayer/omp-stdlib
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
nightscout/nocturne#1424 ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success Abiertoarea: repo bug perceived difficulty: 2
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
impl detach for native Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
paritytech/zombienet-sdk#591 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
mruangutai/harness#1897 ·