Lua Error (attempt to perform arithmetic on upvalue)
4 replies, posted
Hello,
I was trying to recode some derma because the function I needed didn't work.
I made it works, but there have appeared a lua eror
[ERROR] addons/character_and_clothes_wdrm/lua/clothesmod/client/cl_new_character.lua:1055: attempt to perform arithmetic on upvalue 'defMaleInfos' (a table value)
1. DoClick - addons/character_and_clothes_wdrm/lua/clothesmod/client/cl_new_character.lua:1055
2. unknown - lua/vgui/dlabel.lua:232
Here's the link to a part of this code: Pastebin
Here's the link to a code of tables which are using in the code: Pastebin
Can you help me please?
Send all the code in cl_new_character.lua in one Pastebin, so we can get proper line numbering.
Link to the full code: Pastebin
This buttons are using for choose sex of character, by default character is male but when I click to button in order to change it to female and then I again click to male button error appears
What are you trying to do on lines 1051-1055? Comments in Lua are done with -- (single line) and --[[ ]] (multi-lined). -[ ] is invalid.
I've fixed name change after sex change because if I use the original file, when I'm trying to change sex from male to female, a model changes but the name don't.
Now It's work but I have the error.
It's link to the original file: Pastebin
Sorry, you need to Log In to post a reply to this thread.