Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Printing variables

Author
Message
Doveyy04
12
Years of Service
User Offline
Joined: 30th Apr 2012
Location:
Posted: 12th Jun 2012 22:55
Please tell me I can print a variable anywhere on screen and in any color? It's not letting me Createtext (1,a) .... A being the variable
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 12th Jun 2012 23:08
You would need to write it like this: createText(1,str(a))

You need to convert integers into strings to create a text entity or to "print":
print(str(a))

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 12th Jun 2012 23:11 Edited at: 12th Jun 2012 23:11
More information about your code would help. Are you using the appropriate commands to position the text and set its color?

And, you can only use strings with the CreateText command. If you want to display a number, you need to use something like CreateText(1,str(a)).

EDIT: baxslash was just a little faster than me.

Cheers,
Ancient Lady
Doveyy04
12
Years of Service
User Offline
Joined: 30th Apr 2012
Location:
Posted: 12th Jun 2012 23:28
Excellent help once again, that's solved it, was missing the str bit. Thank you
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 12th Jun 2012 23:35
glad to help!

Login to post a reply

Server time is: 2024-11-23 14:49:11
Your offset time is: 2024-11-23 14:49:11