Garry's Mod

Garry's Mod

QCardWars - Card Game in GMod!
Dachaos 2024 年 5 月 18 日 上午 5:42
"attempt to index local 'exp' (a number value)" error on ability use
I am trying to make a custom unit with ability, but when i use it, addon throws an error:

[QCardWars - Card Game in GMod!] lua/entities/ent_qcardwars.lua:874: attempt to index local 'exp' (a number value) 1. qcwEval - lua/entities/ent_qcardwars.lua:874 2. func - lua/entities/ent_qcardwars.lua:1190 3. qcwDoSpecial - lua/entities/ent_qcardwars.lua:2377 4. f - lua/entities/ent_qcardwars.lua:414 5. qcwPressed - lua/entities/ent_qcardwars.lua:2768 6. fn - lua/entities/ent_qcardwars.lua:2833 7. unknown - lua/ulib/shared/hook.lua:109

:steamdeadpan::steamdeadpan::steamdeadpan:

Edited:
it's also can occur on the custom powers and break the game completely. I don't know what is the 'exp' variable and why code tried to 'index it'.

Sometimes this error is fixing for a while by edit ability/power properties several times. Or not, i forgot it.

Edited again:
After research, i think variables !SELF and !LID have been triggering the error.
Fun fact: error occurs only on the custom units/powers. Default units and powers have been working correctly without some errors (except mdlCache, but it's just network error).
最後修改者:Dachaos; 2024 年 5 月 19 日 上午 2:55