Inputting Player name to be used in all scenes

Hello everyone, so i am currently making another game, and i wanted it that players would be able to input what they would want to have as their nicknames but my problem is saving it so it can show in all scenes and making it appear in the next scene, it just appears as 0 when i try.

In welcome Screen Events, set the global variable playername to VariableString(name).

The read action saves it in a scene and not a global variable.

i did that already but it converts to 0 in next scenes

okay. so what else can i do to save it globally?

@Gruk you’re a pro, pls can you help me out here

image
Here, you’re loading your save, but you’re not displaying the value you loaded. :man_shrugging:

PS: If someone gives you a fix, and it doesn’t solve the issue, post updated screenshots.

okay. i see. so what do you suggest i do cos there was a time i actually did a save code but the input of the player always came out as number 0 in the next scene, and not what they had typed. How do i convert that one to string?

Add this directly under your Read action.
01

If you assign a variable to a string, it’ll set it to “0”. Look through your events, spot where else you’re making this same mistake and fix it.

thanks i’ll try that out now

hmmm. okay so i shouldnt use variables here?

You should be using variables, you need to use them correctly. Don’t assign a number straight to a string,. convert it.

Thanks all, i’ve fixed it :sunglasses:

1 Like