136 |
AbstractEngineChannel* pEngineChannel = |
AbstractEngineChannel* pEngineChannel = |
137 |
static_cast<AbstractEngineChannel*>(m_vm->m_event->cause.pEngineChannel); |
static_cast<AbstractEngineChannel*>(m_vm->m_event->cause.pEngineChannel); |
138 |
|
|
139 |
if (args->arg(0)->exprType() == INT_EXPR) { |
if (args->argsCount() == 0 || args->arg(0)->exprType() == INT_EXPR) { |
140 |
const ScriptID id = args->arg(0)->asInt()->evalInt(); |
const ScriptID id = (args->argsCount() >= 1) ? args->arg(0)->asInt()->evalInt() : m_vm->m_event->id; |
141 |
if (!id) { |
if (!id && args->argsCount() >= 1) { |
142 |
wrnMsg("ignore_event(): event ID argument may not be zero"); |
wrnMsg("ignore_event(): event ID argument may not be zero"); |
143 |
// not errorResult(), because that would abort the script, not intentional in this case |
// not errorResult(), because that would abort the script, not intentional in this case |
144 |
return successResult(); |
return successResult(); |