AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   error 217 (https://forums.alliedmods.net/showthread.php?t=13860)

tarin 05-31-2005 18:20

error 217
 
when it says this in the compiling thing wat does it mean?

error 217: loose identification

Quote:



/* Another simple silly plugin by {W`C} Bludy

USAGE: amx_revive < part of nick > or < @ team > or < # index > < user health >

Revives player with set amount of health made for fun purposes only!
Announces when player is revived

Warning: You must enter the amount of health you want the player to be revived with
or the user or team will die causing a death and possible team loss. If done correctly
the player will spawn with the given health and the basic weapons given at the start
of the round.

*/


#include <amxmodx>
#include <fun>

public client_revive(admin_index,victim_index,user_h ealth)

{

new arg1[32]
read_argv(1,arg1,32)

new team[32]
get_user_team(victim_index,team,32)

new name[32]
get_user_name(victim_index,name,32)

if (equal(arg1,"@"))
{
if (equal(team,"CT"))
{
set_hudmessage(0, 0, 200, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)
show_hudmessage(0,"The Counter-Terrorists Have Been Revived!!!")
give_item(victim_index,"weapon_usp")
give_item(victim_index,"ammo_45acp")
give_item(victim_index,"ammo_45acp")
give_item(victim_index,"weapon_knife")
}
else if (equal(team,"TERRORIST"))
{
set_hudmessage(200, 0, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)
show_hudmessage(0,"The Terrorists Have Been Revived!!!")
give_item(victim_index,"weapon_glock18")
give_item(victim_index,"ammo_9mm")
give_item(victim_index,"ammo_9mm")
give_item(victim_index,"weapon_knife")
}
}
else
{
set_hudmessage(0, 200, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)
show_hudmessage(0,"%s Has Been Revived!!!",name)
}

spawn(victim_index)
set_user_health(victim_index,user_health)

return PLUGIN_CONTINUE
}



public admin_revive(id)
{


if (!(get_user_flags(id)&ADMIN_LEVEL_A)){
client_print(id,print_console,"[AMX] You have no access to that command")
return PLUGIN_HANDLED
}
new argc = read_argc()
if (argc < 3)
{
client_print(id,print_console,"[AMX] Usage: amx_revive < part of nick > or < @ team > or < # index > < user health >")
return PLUGIN_HANDLED
}

new arg1[32]
new arg2[32]
new arg3[32]
read_argv(1,arg1,32)
read_argv(2,arg2,32)
read_argv(3,arg3,32)

//Team revive
if (equal(arg1,"@"))
{
new players[32], inum
get_players(players,inum,"e",arg2)
for(new i = 0 ;i < inum ;++i)
client_revive(id,players[i],str_to_num(arg3))
if (inum)
client_print(id,print_console,"[AMX] * All clients from ^"%s^" have been revived *",arg2)
else
client_print(id,print_console,"[AMX] No clients in such team")
}
//Index revive
if (equal(arg1,"#"))
{
if (is_user_connected(str_to_num(arg2)))
client_revive(id,str_to_num(arg2),str_to_num( arg3))
else
client_print(id,print_console,"[AMX] Client not found")

}
//Part of Name revive
else
{
new player = find_player("lb",arg1)
if (player)
client_revive(id,player,str_to_num(arg2))
else
client_print(id,print_console,"[AMX] Client with that part of nick not found")
}
return PLUGIN_HANDLED
}

public plugin_init()
{
register_plugin("Team Revive","0.8.4","{W`C} Bludy")
register_clcmd("amx_revive","admin_revive",AD MIN_LEVEL_A,"amx_revive < part of nick > or < @ team > or < # index > < user health > ")
return PLUGIN_CONTINUE

}





v3x 05-31-2005 18:22

It's just a warning, nothing to worry about really.. It just means you didn't indent properly.

WaZZeR++ 05-31-2005 18:23

thats the tabs that isnt right. Here is a fixed verision. But its nothing to worie about, the plugin will work any way
Code:
/* Another simple silly plugin by {W`C} Bludy USAGE: amx_revive < part of nick > or < @ team > or < # index > < user health > Revives player with set amount of health made for fun purposes only! Announces when player is revived Warning: You must enter the amount of health you want the player to be revived with or the user or team will die causing a death and possible team loss. If done correctly the player will spawn with the given health and the basic weapons given at the start of the round. */ #include <amxmodx> #include <fun> public client_revive(admin_index,victim_index,user_health) {         new arg1[32]     read_argv(1,arg1,32)         new team[32]     get_user_team(victim_index,team,32)         new name[32]     get_user_name(victim_index,name,32)         if (equal(arg1,"@"))         {         if (equal(team,"CT"))             {             set_hudmessage(0, 0, 200, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)             show_hudmessage(0,"The Counter-Terrorists Have Been Revived!!!")             give_item(victim_index,"weapon_usp")             give_item(victim_index,"ammo_45acp")             give_item(victim_index,"ammo_45acp")             give_item(victim_index,"weapon_knife")         }         else if (equal(team,"TERRORIST"))             {             set_hudmessage(200, 0, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)             show_hudmessage(0,"The Terrorists Have Been Revived!!!")             give_item(victim_index,"weapon_glock18")             give_item(victim_index,"ammo_9mm")             give_item(victim_index,"ammo_9mm")             give_item(victim_index,"weapon_knife")         }     }     else         {         set_hudmessage(0, 200, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)         show_hudmessage(0,"%s Has Been Revived!!!",name)     }         spawn(victim_index)     set_user_health(victim_index,user_health)         return PLUGIN_CONTINUE } public admin_revive(id) {             if (!(get_user_flags(id)&ADMIN_LEVEL_A)){         client_print(id,print_console,"[AMX] You have no access to that command")         return PLUGIN_HANDLED     }     new argc = read_argc()     if (argc < 3)         {         client_print(id,print_console,"[AMX] Usage: amx_revive < part of nick > or < @ team > or < # index > < user health >")         return PLUGIN_HANDLED     }         new arg1[32]     new arg2[32]     new arg3[32]     read_argv(1,arg1,32)     read_argv(2,arg2,32)     read_argv(3,arg3,32)         //Team revive     if (equal(arg1,"@"))         {         new players[32], inum         get_players(players,inum,"e",arg2)         for(new i = 0 ;i < inum ;++i)         client_revive(id,players[i],str_to_num(arg3))         if (inum)             client_print(id,print_console,"[AMX] * All clients from ^"%s^" have been revived *",arg2)         else             client_print(id,print_console,"[AMX] No clients in such team")     }     //Index revive     if (equal(arg1,"#"))         {         if (is_user_connected(str_to_num(arg2)))             client_revive(id,str_to_num(arg2),str_to_num(arg3))         else             client_print(id,print_console,"[AMX] Client not found")             }     //Part of Name revive     else         {         new player = find_player("lb",arg1)         if (player)             client_revive(id,player,str_to_num(arg2))         else             client_print(id,print_console,"[AMX] Client with that part of nick not found")     }     return PLUGIN_HANDLED } public plugin_init() {     register_plugin("Team Revive","0.8.4","{W`C} Bludy")     register_clcmd("amx_revive","admin_revive",ADMIN_LEVEL_A,"amx_revive < part of nick > or < @ team > or < # index > < user health > ")     return PLUGIN_CONTINUE     }

v3x 05-31-2005 18:27

Or put this at the top:
Code:
#pragma tabsize 0

tarin 05-31-2005 18:33

TY
 
thanks....now all i need to know is how to combine all my plugins.

http://forums.alliedmods.net/showthread.php?t=13862

Wuu 07-09-2009 13:00

Re: error 217
 
Quote:

Originally Posted by v3x (Post 117097)
It's just a warning, nothing to worry about really.. It just means you didn't indent properly.

How to ident properly? :?


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

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