(e) vs (event)

This might be a stupid question honestly is not a big deal but im wondering
if im missing something here. While coding on different projects I notice if
I write a function using (event) then my screen goes black i get an error on
terminal and if i replace (event) with (e) it works fine, and sometimes vice-versa
I thought (e) was a short term for (event) and both would work fine on functions
that require event.phases like if (e.phase == “ended”)then blah blah blah
Am I missing something here? lol

Thanks,
Chris [import]uid: 30314 topic_id: 17415 reply_id: 317415[/import]

may be u r getting error due to specifying e in bracket and using event in ur code or vice-versa both must be same try below code and replace harshit with anything at both place

[lua]local function touchMe(harshit)
print(harshit.x)
end
Runtime:addEventListener(“touch”,touchMe)[/lua]
:slight_smile: [import]uid: 12482 topic_id: 17415 reply_id: 65917[/import]

Thanks you are absolutely correct It never crossed my mind if I use
local function lol(event) i would have to type if(event.phase)then
and vice-versa which is still kind of weird since both have same
function meaning right? I always thought (e) was short for (event) [import]uid: 30314 topic_id: 17415 reply_id: 65926[/import]

e or event or just. variables you could use anything you want like
e
event
action
joeblow
jumpingjackflash

it doesn’t matter as long as you use the same though out the function
most use e or event cause it makes sense when you read code [import]uid: 7911 topic_id: 17415 reply_id: 65929[/import]

@ jstrahan

Thanks that makes sense I always used e or event I never payed attention
that if I use e then my function will contain e.phase and vice-versa with
event. [import]uid: 30314 topic_id: 17415 reply_id: 65933[/import]

Yep, As jstrahan said you can use any name you want.

Event just is the most common used due to its relevance [import]uid: 84637 topic_id: 17415 reply_id: 66013[/import]