Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Спасибо
If you're working on a server, I highly recommend you go into DrugsDLC_OnEat.lua and modify it to make sure you always reference the Player correctly, and don’t forget that it’s essential to implement proper error/null handling.
I’ll release a fix for this ASAP ^^
(Btw i highly recommend you 4o and/or Copilot, they are the best for codding)
"The issue causing all four errors (attempted index: getModData of non-table: null) is due to a simple yet critical mistake: you're trying to access the player object's method before properly initializing it."
"should have player initialized first before calling getModData().
Here is the optimized and corrected version of your script. Replace the contents of your DrugsDLC_OnEat.lua with the following to resolve your errors"
OnEat_HasTakenXanax -- file: DrugsDlc_OnEat.lua line #64
OnEat_HasTakenShrooms -- file: DrugsDlc_OnEat.lua line #84
OnEat_HasTakenFentanyl -- file: DrugsDlc_OnEat.lua line #44
OnEat_HasTakenDrugs -- file: DrugsDlc_OnEat.lua line #4
OnEat_HasTakenCocaine -- file: DrugsDlc_OnEat.lua line #24