Jump to content
Sign in to follow this  
Jamie1414

Adding Letters To Variables

Recommended Posts

Jamie1414

Hey im having trouble adding a letter to a variable. this is what code i was trying to do it with but failed in doing so...

$command = $command + "y"

if u are wondering, i am using this code to find out what the user is typing for my friends game so i can know what the user inputs in his textbased game. and i got a hotkey for every character, if any1 has a better way to do this plz tell me :think:

Share this post


Link to post
Share on other sites
Thatsgreat2345

u havent defined $command and you cant add letters you would do a & not a +

and if ur trying to figure out that then check out _ispressed in beta

Edited by thatsgreat2345

Share this post


Link to post
Share on other sites
Jamie1414

oh yeah..i declared it as global $command and thx for that bit

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.