| 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, HOST[ 25 ], PORT, FILENAME[ 64 ], HOSTNAME[ 64 ], GAMETYPE[ 25 ], MAPNAME[ 25 ], PLAYERS, MAXPLAYERS, BOTS, PLAYERSNAMES[ 33 ][ 32 ], PLAYERSFRAGS[ 33 ], Float:PLAYERSTIME[ 33 ], PASSWORD[ 5 ], PACKET, TOTALPACKET }
enum _:iRulesData { TIMELEFT[ 20 ], NEXTMAP[ 25 ], AIRACCELERATE[ 5 ], GRAVITY[ 5 ], MAXSPEED[ 5 ] }; new g_ServersData[ 10 ][ iServersData ]; new g_RulesData[ iRulesData ];
public plugin_init( ) { register_plugin( PLUGIN, VERSION, "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.
|