Raised This Month: $ Target: $400
 0% 

Enter a text into a string manually


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Facksy
Senior Member
Join Date: Apr 2017
Location: +2+2
Old 05-19-2017 , 13:49   Enter a text into a string manually
Reply With Quote #1

Hello guys, I would to put a text (ex: potatoes) into a string (ex: decl String:potatoes[64])
How can I do that?
Facksy is offline
headline
SourceMod Moderator
Join Date: Mar 2015
Old 05-19-2017 , 14:08   Re: Enter a text into a string manually
Reply With Quote #2

PHP Code:
// Size defined by the initializing string's length
char[] string1 "Potato";

// Size defined by programmer
char string2[32] = "Potato";

// Generally used for formating or even string concatenation
// but still helpful to know.
char string3[32];
Format(string3sizeof(string3), "Potato"); 

Last edited by headline; 05-19-2017 at 14:09.
headline is offline
Facksy
Senior Member
Join Date: Apr 2017
Location: +2+2
Old 05-19-2017 , 14:17   Re: Enter a text into a string manually
Reply With Quote #3

Thanks ;D
Facksy is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:39.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode