Raised This Month: $ Target: $400
 0% 

String


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
polodu94
Senior Member
Join Date: Jun 2010
Old 07-31-2010 , 06:03   String
Reply With Quote #1

Hi all,

I'm very bad with string manipulation so i tell you my problem :

I have one variable por example : name[ 24 ]

I want to put one string in one case of the tab, por example :

name[ 0 ] = "Hello"
name[ 1 ] = "Ok"

But i want to put some different string not a string list por example i don't want :

string = " hello ok"

name[ 0 ] = "hello"
name[ 1 ] = "ok"

I don't want that.

I want to put some string in the tab, how i want.

Can you help me ?

I have tested :

name[ 24 ][ 32 ]

format( name[ 1 ], 31, "ok" );

But that don't done.

PS : Sorry for my english
polodu94 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-31-2010 , 06:48   Re: String
Reply With Quote #2

Use copy() instead of format().
__________________
Arkshine is offline
polodu94
Senior Member
Join Date: Jun 2010
Old 07-31-2010 , 06:59   Re: String
Reply With Quote #3

I do that :

new name[ 24 ][ 33 ];

// In a function

copy( name[ num ], 32, flag );

// and in a function i show

client_print( id, print_chat, "%L", id, "SHOW_NAME", name[ num ] );

But that don't work can you help me
polodu94 is offline
Old 07-31-2010, 07:06
Arkshine
This message has been deleted by Arkshine. Reason: lag
polodu94
Senior Member
Join Date: Jun 2010
Old 07-31-2010 , 07:15   Re: String
Reply With Quote #5

But i use copy instead of format in my code it's copy witch i use
polodu94 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-31-2010 , 07:17   Re: String
Reply With Quote #6

I know the forum was lagging.

Show the content of SHOW_NAME.
__________________
Arkshine is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 07-31-2010 , 07:18   Re: String
Reply With Quote #7

?

PHP Code:
new name][] = 
{
    
"hello",
    
"ok"
}

or

copyname] , charsmaxname[] ) , "hello" );
copyname] , charsmaxname[] ) , "ok" ); 
__________________
Bugsy is offline
polodu94
Senior Member
Join Date: Jun 2010
Old 07-31-2010 , 07:23   Re: String
Reply With Quote #8

SHOW_NAME = The name is %s

and flag contain "hello" or "ok" or everything it's a function and they are multi tell of function so :

1 tell of function name[ num ] = "hello"
seconde tell of function name[ num++ ] = "ok" or everything
polodu94 is offline
polodu94
Senior Member
Join Date: Jun 2010
Old 07-31-2010 , 07:28   Re: String
Reply With Quote #9

Sorry all it's not my problem with string it's a stupid mystek, that work with format and copy I've just forgot the number of tha tab ^^

It's 33 instead of 24 sorry and ty
polodu94 is offline
Reply


Thread Tools
Display Modes

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 00:16.


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