self.Magazine is nil in Create()
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Start with Data/Browncoats.rte/Devices/Weapons/Extinction/Extinction.lua and the reported Create() call that accesses self.Magazine; compare its fallback with the failing mod's INI magazine setup. Use the supplied mods and benchmark activity to reproduce the intermittent nil value at startup, then trace where the magazine is initialized. Done means the cause is identified and self.Magazine is reliably available when Create() uses it.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
self.Magazine can seemingly randomly be nil in Create()
Pawnis' recent Browncoat script even points it out with a comment, in Data/Browncoats.rte/Devices/Weapons/Extinction/Extinction.lua:
self.maxAmmoCount = self.Magazine and self.Magazine.Capacity or 5; -- loading a game might mess this up, so... fall-back
In the mod I found the issue, the error originates from here:
function Create(self)
self.ammoCounter = 100
self.recoil = 0
self.ff = false
print(self.Magazine)
self.f0 = ToMagazine(self.Magazine).RoundCount
self.f1 = ToMagazine(self.Magazine).RoundCount
self.firetimer = Timer()
end
I added the print(self.Magazine), and it shows that self.Magazine is nil a portion of the time it gets printed here.
Where the single ini file where it's used looks roughly like this:
AddAmmo = Magazine
PresetName = Magazine ChainChoppa
AddDevice = HDFirearm
PresetName = Chain Choppa
ScriptPath = orks.rte/Weapons/ChainChoppa/ChainChoppa.lua
Magazine = Magazine
CopyOf = Magazine ChainChoppa
To Reproduce
I haven't taken the time to make a Minimal Reproducible Example yet, but this should show the error after a minute or two of running:
- Download orks.rte.zip
- Download Benchmark.rte.zip
- Use this in your Settings.ini to instantly have the issue printed when the game boots:
LaunchIntoActivity = 1
DefaultActivityType = GAScripted
DefaultActivityName = Combat Benchmark
DefaultSceneName = Benchmark
- Lenguaje dominante
- C++
- Estrellas
- 329
- Forks
- 47
- Merge medio
- 6 d 10 h
- PR fusionados (30 d)
- 14
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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 cortex-command-community/Cortex-Command-Community-Project
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
cortex-command-community/Cortex-Command-Community-Project#315 ·
Los mantenedores suelen responder en 2 días
-
enhancement
Dificultad 1/5 Menos de una hora Aptitud para principiantes 87/100
cortex-command-community/Cortex-Command-Community-Project#301 ·
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 50/100
cortex-command-community/Cortex-Command-Community-Project#316 ·
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 57/100
cortex-command-community/Cortex-Command-Community-Project#314 ·
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 55/100
cortex-command-community/Cortex-Command-Community-Project#313 ·
Los mantenedores suelen responder en 2 días
Todos los issues de cortex-command-community/Cortex-Command-Community-Project
Issues similares
-
A-tools P-medium S-ready-to-start studio task
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Status: Needs confirmation Status: Needs triage Type: Code Quality
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Image.resolveAssetSource's TypeScript declaration drops the null it returns for an unknown assetAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
react/react-native#59648 ·
Los mantenedores suelen responder en 2 días
-
platform: Linux
Dificultad 1/5 Menos de una hora Aptitud para principiantes 80/100
keepassxreboot/keepassxc#13947 ·
Los mantenedores suelen responder en 1 día
-
Shell: serve the home app's Cookie Policy on a hard reloadPosiblemente ocupada @2001anshkaushik la tomó hoy. Abiertofeature module:ai
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
rocketride-org/rocketride-server#2899 · 1 comentario ·
Los mantenedores suelen responder en 2 días