Author Topic: Saving/Loading Script[Solved]  (Read 3983 times)


From the code you've posted it looks like you declared addItem as a method for the Player class. To fix the issue you're having you will need to call that method on a player like so.

Code: [Select]
%player.addItem(%file.readLine(), %client);

That is what is causing the problem.


Code: [Select]
addItem(%client.player.tool[0],%file.readLine());
Should be
Code: [Select]
%player.addItem(%file.readLine(), %client);

Also, there are a lot of unnecessary lines of code in your functions. It seems to me like you don't understand how the code works, and are just copy pasting other peoples work together. I recommend you read through a lot of other add-ons before you try to make your own, to try and get an understanding of how torque works.