Skip to content
User Avatar
#2720
Auto-translated
Here's the question. I have several identical objects with triggers attached to them. I wrote a function that can work with any of them and takes the object number as an argument. I call it with a touch trigger like this: `Trigger(OBJECT_TOUCH_TRIGGER, 'object name', 'function(object number)')`. This works, but each time it triggers, it writes an error to the console: "attempts to call a nil value." Should I ignore this error, since everything works as intended, or does it actually affect something?

UPD. I experimented a bit and came up with this. If I write something like: `

str = 'function(parameter)'
...
Trigger(OBJECT_TOUCH_TRIGGER, 'object name', 'parse(str)')

then there will be no error in the console. However, I don't fully understand how this works and whether it's a good approach.
Нет войне.