Raised This Month: $ Target: $400
 0% 

warning 217: loose indentation


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GX_JazZ
Member
Join Date: Dec 2014
Old 12-17-2014 , 10:29   Re: warning 217: loose indentation
Reply With Quote #1

Try this :
Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fun>

#define PLUGIN "knifeitup"
#define VERSION "3.0"
#define AUTHOR "Gullu Bhai"


public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_cvar("knifeitup_hp", "25")
register_cvar("knifeitup_adminhp", "100")
register_cvar("knifeitup_frags", "5")
register_event("DeathMsg", "Event_DeathMsg_knife", "a")
}

new CustomSound[][] =  
{
"misc/knife1.wav",
"misc/knife2.wav",
"misc/knife3.wav",
"misc/knife4.wav",
"misc/knife5.wav"
}

public plugin_precache()
{
for ( new i; i < sizeof CustomSound; i++ )
{
precache_sound( CustomSound[ i ]);
}
}   


public Event_DeathMsg_knife()
{
new Killer = read_data(1)
new Victim = read_data(2)

if (!is_user_alive(Killer) || (Killer == Victim))
return;

new szName[32], szName2[32]
get_user_name(Killer, szName, charsmax(szName)) 
get_user_name(Victim, szName2, charsmax(szName2)) 

new CheckWeapon[6];
read_data(4, CheckWeapon, 5);

if (equal(CheckWeapon, "knife"))
{
new php = get_cvar_num("knifeitup_hp")
new ahp = get_cvar_num("knifeitup_adminhp")
new frags = get_cvar_num("knifeitup_frags")


if(get_user_flags(Killer) & ADMIN_KICK) 
{
client_print_color(0, print_chat, "%s Got %d Frags %d hp For Knifing Admin %s", szName, frags, ahp, szName2)
client_cmd( 0, "spk %s", CustomSound[ random_num( 0, sizeof CustomSound - 1 ) ] ); //by Arkshine
set_user_health(Killer, get_user_health(Killer) + ahp)
set_user_frags(Killer, get_user_frags(Killer) + frags)
}
else
{
client_print_color(0, print_chat, "%s Got %d Frags %d hp For Knifing %s", szName, frags, php, szName2)
client_cmd( 0, "spk %s", CustomSound[ random_num( 0, sizeof CustomSound - 1 ) ] );  //by Arkshine
set_user_health(Killer, get_user_health(Killer) + php)
set_user_frags(Killer, get_user_frags(Killer) + frags)
}
} 
}  

stock client_print_color(id, type, const text[], any:...)
{
if(type == print_chat)
{
new g_iMsgidSayText;
g_iMsgidSayText = get_user_msgid("SayText");

new szMsg[191], iPlayers[32], iCount = 1;
vformat(szMsg, charsmax(szMsg), text, 3);

replace_all(szMsg, charsmax(szMsg), "!g","^x04");
replace_all(szMsg, charsmax(szMsg), "!n","^x01");
replace_all(szMsg, charsmax(szMsg), "!t","^x03");

if(id)
iPlayers[0] = id;
else
get_players(iPlayers, iCount, "ch");

for(new i = 0 ; i < iCount ; i++)
{
if(!is_user_connected(iPlayers[i]))
continue;

message_begin(MSG_ONE_UNRELIABLE, g_iMsgidSayText, _, iPlayers[i]);
write_byte(iPlayers[i]);
write_string(szMsg);
message_end();
}
}
}
GX_JazZ is offline
Send a message via Skype™ to GX_JazZ
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 12-17-2014 , 12:06   Re: warning 217: loose indentation
Reply With Quote #2

Quote:
Originally Posted by GX_JazZ View Post
Try this :
That code looks like crap. Where is the indentation? How can you see which scope ends where?
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 12-17-2014 , 14:12   Re: warning 217: loose indentation
Reply With Quote #3

Quote:
Originally Posted by YamiKaitou View Post
That code looks like crap. Where is the indentation? How can you see which scope ends where?
Why does everything always have to end?
Why won't somethings last forever?
.Dare Devil. is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-17-2014 , 19:16   Re: warning 217: loose indentation
Reply With Quote #4

Quote:
Originally Posted by .Dare Devil. View Post
Why does everything always have to end?
Why won't somethings last forever?
You said you were done coding now please go away.
__________________
fysiks is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 12-18-2014 , 06:35   Re: warning 217: loose indentation
Reply With Quote #5

Quote:
Originally Posted by fysiks View Post
You said you were done coding now please go away.
So? no im not going anywhere...
.Dare Devil. is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:17.


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