Raised This Month: $ Target: $400
 0% 

Problem with Array


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Vit_amin
Senior Member
Join Date: Dec 2015
Location: Russian Federation
Old 01-21-2016 , 16:13   Problem with Array
Reply With Quote #1

I write code:
PHP Code:
                new szTest[33]
                new 
szTest2[128]
                
get_user_info(client"name"szTestcharsmax(szTest))
                new 
iTest 0
                
for (new 0<= charsmax(szTest2); i++)
                {
                    if (!
strcmp(szTest2[i], ""))
                    {
                        
iTest++
                        if (
iTest <= strlen(szTest))
                        {
                            
server_print("TEST 1")
                            
copy(szTest2[i], charsmax(szTest2), szTest[i])
                        }
                        else if (
iTest == strlen(szTest) + 1)
                        {
                            
server_print("TEST 2")
                            
copy(szTest2[i], charsmax(szTest2), ",")
                        }
                        else break
                    }
                }
                
server_print(szTest2
How output this format ? Name1, Name2, Name3, ...
Server output only Name1 or Name2 or Name3 or ...
Vit_amin is offline
 



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 18:29.


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