AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Using a string that contains a name + number (https://forums.alliedmods.net/showthread.php?t=24528)

Des12 02-25-2006 12:44

Using a string that contains a name + number
 
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?

knekter 02-25-2006 12:53

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++; }


All times are GMT -4. The time now is 20:22.

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