Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   Passing Variables to different methods (http://www.alice.org/community/showthread.php?t=12112)

PostalDave 10-04-2018 11:34 AM

Passing Variables to different methods
 
I'm making a game for class that opens with a login / Registration page. When the game opens, the player will either login with an established email address and password, or he will register and add a new name, email address, password, etc. The new registration information does not have to be saved on the world permanently, but it has to used in the game. Then the registration, or the login information has to be used in a report at the end for how many points the player earned.

So the questions are, In Alice, 2 can I pass a variable in one method to another method?
Would it be better to pass the variables to an Array or List?

I've been trying to find a video to show me how to do this but I haven't had any luck.
Thanks for any help you can provide.
Dave

Dehixial 10-25-2018 07:29 AM

maybe
 
Try storing it within an object rather than a method maybe?

PostalDave 11-11-2018 11:02 AM

Thank you.

Dehixial 11-12-2018 07:10 AM

[QUOTE=PostalDave;58535]Thank you.[/QUOTE]

Had it worked?


All times are GMT -5. The time now is 07:12 AM.

Copyright ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.