Raised This Month: $ Target: $400
 0% 

Using a string that contains a name + number


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Des12
Senior Member
Join Date: Jan 2005
Old 02-25-2006 , 12:44   Using a string that contains a name + number
Reply With Quote #1

Hello, I am trying to create a team name and a team number in the same string.

Example:

Code:
new g_teamName[51][12]

The '51' will contain the team name, and the '12' will contain the 2 digit team number for 12 teams.
Code:
public makeTeam(id) {     new message[51]     read_argv(1,message,50)     remove_quotes(message)         g_teamCount++         copy(g_teamName[][g_teamCount], 50, message)         return PLUGIN_HANDLED }

This errors on compile. So my question is how do you copy into the '51' but leave the '12' alone?
__________________
-Dest Romano

www.JustRP.com
A TSRP Server

Quote:
Originally Posted by Brad
Don't you go be bringing reality into this.
Des12 is offline
knekter
Senior Member
Join Date: Mar 2004
Location: PA
Old 02-25-2006 , 12:53  
Reply With Quote #2

Code:
new g_teams[12][51]; new g_teamNums = 0; public makeTeam(id) {     read_argv(1, g_teams[g_teamNums], 50);     remove_quotes(g_teams[g_teamNums]);     g_teamNums++; }
__________________
More updates for Matrix Mod!
knekter is offline
Send a message via AIM to knekter Send a message via MSN to knekter
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 20:22.


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