Difference in local changeScore = function(newScore) and function changeScore(newscore)

Can someone explain what the difference would be in these two statements?

local changeScore = function(newScore)

and

function changeScore(newscore)

Thank you, sorry if it’s a silly question but I can’t seem to remember using this ever in any other languages I’ve used, unless I’m forgetting one??
[import]uid: 26664 topic_id: 6299 reply_id: 306299[/import]

bump

No differences in this? Is it just a syntax thing? [import]uid: 26664 topic_id: 6299 reply_id: 21985[/import]

one is local, one isn’t

you could also do

[lua]local function changeScore(newScore)[/lua] [import]uid: 6645 topic_id: 6299 reply_id: 21993[/import]

Woops, thought I typed in local in both. Alright so it’s just a preference:

function myFunction()

is the same as

myFunction = function()

thanks. I am used to C, so I’ll stick with function myFunction() :slight_smile:
[import]uid: 26664 topic_id: 6299 reply_id: 21995[/import]