Ranking
You can't just comment out code and still expect it to work. Why do you think the code was there in the first place?

Yes, this can be fixed but it needs to be done by someone who actually knows what the code is doing. A few pointers to whoever wants to fix this:

The part that isn't working is the loadfile call in line 162, i.e., the loading of the data. The saving should work fine. The loading fails because loadfile is broken in recent versions of toribash. In order to fix this you have to load the data differently. Currently saveData (line 149) writes code to a file called "tadata.lua" that creates a function called tadata which returns all the move data (pretty overengineered but w/e). Instead of loading that function and calling it as it currently happens in lines 162 - 165 you have to parse the data out of the tadata.lua file manually.
Signature temporarily out of order.