Attempt to index global "loadSave" a nil value

Hello , 

i m new in this game development world , and i’m getting a strange error in my code : Attempt to index global “loadSave” a nil value  i don’t see what it can means 

My code 

errorCode_zps5eeb949e.jpg

the error is on line 52 when i try save operation , but in line 47 i try load operation and it works well , the load save module work fine in all other situations so the problem is on menu i think 

thanks for help 

As error says - you try to access saveLoad which does not exist. You have saveload which is all lower cases. Lua is case sensitive language and saveLoad vs saveload are two different variables.

Lua variable names are case sensitive.  You have loadsave in one place and loadSave in another.

OMG i checked it alot of times hahahah , thank you guys , notepad++ deceived me i select the word and he select same word but i had not noticed that notepad ++ isn’t case sensitive ^^

Thank You for Help

It’s not the case that notepad is not case-sensitive. You just have case-insensitive search set. You can change it to case-sensitive :slight_smile:

As error says - you try to access saveLoad which does not exist. You have saveload which is all lower cases. Lua is case sensitive language and saveLoad vs saveload are two different variables.

Lua variable names are case sensitive.  You have loadsave in one place and loadSave in another.

OMG i checked it alot of times hahahah , thank you guys , notepad++ deceived me i select the word and he select same word but i had not noticed that notepad ++ isn’t case sensitive ^^

Thank You for Help

It’s not the case that notepad is not case-sensitive. You just have case-insensitive search set. You can change it to case-sensitive :slight_smile: