Raised This Month: $ Target: $400
 0% 

Simple Help !


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
abhishek_deshkar
Senior Member
Join Date: Jun 2013
Location: Earth
Old 07-13-2013 , 11:12   Simple Help !
Reply With Quote #1

Hello pro ppl,

I need a little help. So, for example I have two integer numbers or two strings and if I want to combine both strings to one string or number then how it can be done in AMX ?


Thanks
abhishek_deshkar is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 07-13-2013 , 11:36   Re: Simple Help !
Reply With Quote #2

format(ex)
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
abhishek_deshkar
Senior Member
Join Date: Jun 2013
Location: Earth
Old 07-13-2013 , 12:08   Re: Simple Help !
Reply With Quote #3

Okay ! Another thing is if I have an array of my name and I want to combine array data and store it into a string variable ?
abhishek_deshkar is offline
abhishek_deshkar
Senior Member
Join Date: Jun 2013
Location: Earth
Old 07-13-2013 , 12:18   Re: Simple Help !
Reply With Quote #4

Quote:
Originally Posted by YamiKaitou View Post
format(ex)
One example will be fine !
abhishek_deshkar is offline
akcaliberg
Senior Member
Join Date: Nov 2011
Location: Istanbul
Old 07-13-2013 , 14:55   Re: Simple Help !
Reply With Quote #5

new szBuffer[64];
formatex( szBuffer, charsmax(szBuffer), "%s %s", szFirstText, szSecondText)
akcaliberg is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 07-13-2013 , 15:27   Re: Simple Help !
Reply With Quote #6

Quote:
Originally Posted by abhishek_deshkar View Post
One example will be fine !
Your examples are found when you search
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
abhishek_deshkar
Senior Member
Join Date: Jun 2013
Location: Earth
Old 07-13-2013 , 15:44   Re: Simple Help !
Reply With Quote #7

Quote:
Originally Posted by akcaliberg View Post
new szBuffer[64];
formatex( szBuffer, charsmax(szBuffer), "%s %s", szFirstText, szSecondText)
I mean, for example I have an array of name[2] and array contains "GOD" word.

so each index will have 1 word. Now I want to convert array data to a string variable so when I call string variable "GOD" should be printed !
abhishek_deshkar is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 07-13-2013 , 15:55   Re: Simple Help !
Reply With Quote #8

Not possible as "GOD" is 3 characters and can only fit in an array of 4 or larger.

A string is an array of characters. So what are you trying to do?
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
abhishek_deshkar
Senior Member
Join Date: Jun 2013
Location: Earth
Old 07-13-2013 , 15:59   Re: Simple Help !
Reply With Quote #9

I just want to convert Array data to String. Actually I want to store whole array data into the string variable !

Last edited by abhishek_deshkar; 07-13-2013 at 16:01.
abhishek_deshkar is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 07-13-2013 , 16:13   Re: Simple Help !
Reply With Quote #10

A string is already an array. Show us what you are working with and then maybe we can help you
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou 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 12:31.


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