AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   ERROR: symbol already defined "get_players" (https://forums.alliedmods.net/showthread.php?t=14028)

beretta 06-06-2005 21:16

ERROR: symbol already defined "get_players"
 
I'm confused on why when i try to compile this i get an error saying "symbol already defined 'get_players'".
Code:
new Players[32] new playerCount get_players(Players, playerCount, "b")

im new to amx so be nice to me :wink:

jtp10181 06-06-2005 21:24

you must be trying to do that outside of any other function, you cannot run another function from the global space or it thinks you are trying to define it, it has to be inside of a function.

v3x 06-06-2005 22:18

Here's a basic plugin with get_players():

Code:
#include <amxmodx> public plugin_init() {     register_plugin("Count the Dead","0.1","Jawn Doh")     register_clcmd("say /ctd","count_the_dead") } public count_the_dead(id) {     new players[32],num     get_players(players,num,"b")     client_print(id,print_chat,"There are %i dead players",num)     return PLUGIN_HANDLED }

See if you can figure it out. ;)

beretta 06-07-2005 19:39

hey thanks to both of u for the help :D


All times are GMT -4. The time now is 16:45.

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