• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

How to code to store the score in a global variable temporarily then reset the room

X

Xecries

Guest
How can i code to store the score in a global variable temporarily then reset the room. Then add code to the oGame creation event where it resets the score. Add a check for that global variable. If the global variable is more than 0 then set score to equal the global variable and make the global variable equal 0 again. else score equals 0.
 

Joe Ellis

Member
you could temporarily save it to a .ini file

Code:
ini_open("tempscore.ini")
ini_write_real("score","score",ingamescore)
ini_close()
then when the room is reset
create event:
Code:
ini_open("tempscore.ini")
ingamescore = ini_read_real("score","score",0)
ini_close()
 
Top