AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   enum problem (https://forums.alliedmods.net/showthread.php?t=221454)

red_bull2oo6 07-22-2013 08:57

enum problem
 
hi again, i need some help but this time with enum.

i have this code
PHP Code:

/* Plugin generated by AMXX-Studio */

#include < amxmodx >
#include < sockets >

#define PLUGIN "New Plugin"
#define VERSION "1.0"

enum _:iServerData
{
    
SOCKET,
    
    
HOST25 ],
    
PORT,
    
    
FILENAME64 ],
    
HOSTNAME64 ],
    
GAMETYPE25 ],
    
MAPNAME25 ],
    
PLAYERS,
    
MAXPLAYERS,
    
BOTS,
    
    
PLAYERSNAMES33 ][ 32 ],
    
PLAYERSFRAGS33 ],
    
Float:PLAYERSTIME33 ],
    
PASSWORD],
    
    
PACKET,
    
TOTALPACKET
    
}

enum _:iRulesData
{
    
TIMELEFT20 ],
    
NEXTMAP25 ],
    
AIRACCELERATE],
    
GRAVITY],
    
MAXSPEED]
};
    
new 
g_ServersData10 ][ iServersData ];
new 
g_RulesDataiRulesData ];


public 
plugin_init( )
{
    
register_pluginPLUGINVERSION"Askhanar" );
    
    
// Add your code here...


and i get this when compiling

Code:

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Error: Expected token: "}", but found "[" on line 24
Error: Invalid function or declaration on line 29
Error: Invalid function or declaration on line 32
Warning: Symbol is never used: "g_RulesData" on line 54
Warning: Symbol is never used: "g_ServersData" on line 54

4 Errors.
Could not locate output file D:\Counter Strike\SERVER\cstrike\addons\amxmodx\scripting\4.amx (compile failed).

and here are the lines:

24: PLAYERSNAMES[ 33 ][ 32 ],
32: }


i need it for g_ServersData[ iServer ][ iPlayerName ] ( iPlayername should be a string [33][32] )

thanks in advance.


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

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