waqmaz
Member
- Joined
- Jun 17, 2015
- Messages
- 203
- Reaction score
- 11
How to store a function inside a variable for future purpose? It returns nil.
I gives:
Code:
attackBefore = getItemAttribute(item.uid, 'attack')
attackAfter = 1
doItemSetAttribute(item.uid, 'attack', attackAfter)
print('Attack changed from '..attackBefore..' to '..attackAfter)
I gives:
attempt to concatenate global 'attackBefore' (a nil value)