Raised This Month: $ Target: $400
 0% 

Loose identation


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DarlD
Senior Member
Join Date: Aug 2004
Old 10-19-2005 , 22:29   Loose identation
Reply With Quote #1

I keep getting this error when i try to compile.
Code:
/home/users/amxmodx/tmp3/phpYGOtpE.sma(32) : warning 217: loose indentation
/home/users/amxmodx/tmp3/phpYGOtpE.sma(40) : warning 217: loose indentation
/home/users/amxmodx/tmp3/phpYGOtpE.sma(47) : warning 217: loose indentation
/home/users/amxmodx/tmp3/phpYGOtpE.sma(55) : warning 217: loose indentation
/home/users/amxmodx/tmp3/phpYGOtpE.sma(68) : warning 217: loose indentation
/home/users/amxmodx/tmp3/phpYGOtpE.sma(70) : error 001: expected token: "}", but found "-end of file-"

1 Error.
Could not locate output file /home/groups/amxmodx/public_html/websc3/phpYGOtpE.amx (compile failed).
here is the full plugin code
Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #include <cstrike> #define PLUGIN "Model Rank" #define VERSION "1.0" #define AUTHOR "Author" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_cvar("amx_modelrank", "1")     register_event("ResetHUD", "resetModel", "b")     } public plugin_precache() {         precache_model("models/player/Meta-Skin/leet_t.mdl")         precache_model("models/player/Meta-Skin/leet_ct.mdl")         precache_model("models/player/Meta-Skin/killer_t.mdl")         precache_model("models/player/Meta-Skin/killer_ct.mdl")         precache_model("models/player/Meta-Skin/pro_t.mdl")         precache_model("models/player/Meta-Skin/pro_ct.mdl")         precache_model("models/player/Meta-Skin/newb_t.mdl")         precache_model("models/player/Meta-Skin/newb_ct.mdl")             return PLUGIN_CONTINUE } public resetModel(id, level, cid) {     new frags = get_user_frags(id)     new death = get_user_deaths(id)          if (frags < 19 && death < 9 ) {         new CsTeams:userTeam = cs_get_user_team(id)                 if (userTeam == CS_TEAM_T) {                         cs_set_user_model(id, "newb_t")         }                 else if(userTeam == CS_TEAM_CT) {                         cs_set_user_model(id, "newb_ct")         }      if (frags > 19 && death < 9) {         if (userTeam == CS_TEAM_T) {             cs_set_user_model(id, "killer_t")         }         else if(userTeam == CS_TEAM_CT) {             cs_set_user_model(id, "killer_ct")         }      if (frags > 39 && death < 19) {         if (userTeam == CS_TEAM_T) {             cs_set_user_model(id, "pro_t")         }         else if(userTeam == CS_TEAM_CT) {             cs_set_user_model(id, "pro_ct")                     }      if (frags > 59 && death < 29) {         if (userTeam == CS_TEAM_T){             cs_set_user_model(id, "leet_t")         }         else if(userTeam == CS_TEAM_CT) {             cs_set_user_model(id, "leet_ct")         }         else             cs_reset_user_model(id)         }     }         return PLUGIN_HANDLED } }
__________________
DarlD is offline
Send a message via MSN to DarlD
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 10-19-2005 , 22:33  
Reply With Quote #2

Try using the indenter tool in AMXX Studio ( Ctrl+I )
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 10-19-2005 , 22:34  
Reply With Quote #3

Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #include <cstrike> #define PLUGIN "Model Rank" #define VERSION "1.0" #define AUTHOR "Author" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_cvar("amx_modelrank", "1")     register_event("ResetHUD", "resetModel", "b")     } public plugin_precache() {     precache_model("models/player/Meta-Skin/leet_t.mdl")     precache_model("models/player/Meta-Skin/leet_ct.mdl")     precache_model("models/player/Meta-Skin/killer_t.mdl")     precache_model("models/player/Meta-Skin/killer_ct.mdl")     precache_model("models/player/Meta-Skin/pro_t.mdl")     precache_model("models/player/Meta-Skin/pro_ct.mdl")     precache_model("models/player/Meta-Skin/newb_t.mdl")     precache_model("models/player/Meta-Skin/newb_ct.mdl")         return PLUGIN_CONTINUE } public resetModel(id, level, cid) {     new frags = get_user_frags(id)     new death = get_user_deaths(id)     if (frags < 19 && death < 9 )     {         new CsTeams:userTeam = cs_get_user_team(id)         if (userTeam == CS_TEAM_T)         {             cs_set_user_model(id, "newb_t")         }         else if(userTeam == CS_TEAM_CT)         {             cs_set_user_model(id, "newb_ct")         }         if (frags > 19 && death < 9)         {             if (userTeam == CS_TEAM_T)             {                 cs_set_user_model(id, "killer_t")             }             else if(userTeam == CS_TEAM_CT)             {                 cs_set_user_model(id, "killer_ct")             }             if (frags > 39 && death < 19)             {                 if (userTeam == CS_TEAM_T)                 {                     cs_set_user_model(id, "pro_t")                 }                 else if(userTeam == CS_TEAM_CT)                 {                     cs_set_user_model(id, "pro_ct")                                     }                 if (frags > 59 && death < 29)                 {                     if (userTeam == CS_TEAM_T)                     {                         cs_set_user_model(id, "leet_t")                     }                     else if(userTeam == CS_TEAM_CT)                     {                         cs_set_user_model(id, "leet_ct")                     }                     else                     cs_reset_user_model(id)                     }                             }         }     }       return 0 }
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
DarlD
Senior Member
Join Date: Aug 2004
Old 10-19-2005 , 22:35  
Reply With Quote #4

woha nice. fixed it!

im still getting an error on my plugin though

Code:
/home/users/amxmodx/tmp3/phpVqKQKs.sma(70) : error 001: expected token: "}", but found "-end of file-"
__________________
DarlD is offline
Send a message via MSN to DarlD
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 10-19-2005 , 22:36  
Reply With Quote #5

...use mine?
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
DarlD
Senior Member
Join Date: Aug 2004
Old 10-19-2005 , 22:37  
Reply With Quote #6

yours works yes but i dont see what you changed therefore, i cannot learn how to fix this problem in the future...
__________________
DarlD is offline
Send a message via MSN to DarlD
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 10-19-2005 , 22:38  
Reply With Quote #7

Added a } at the end, and moved the return PLUGIN_HANDLED down a bit, as well as changing it to PLUGIN_CONTINUE (0) for better form.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
DarlD
Senior Member
Join Date: Aug 2004
Old 10-19-2005 , 22:48  
Reply With Quote #8

thanks
__________________
DarlD is offline
Send a message via MSN to DarlD
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 10-19-2005 , 23:00  
Reply With Quote #9

Quote:
Originally Posted by v3x
Try using the indenter tool in AMXX Studio ( Ctrl+I )
http://www.avalanche.epherion.com/indenter/

;-)

It does discrimate against certain coding styles, though, I suppose.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 10-19-2005 , 23:27  
Reply With Quote #10

Quote:
Originally Posted by Hawk552
as well as changing it to PLUGIN_CONTINUE (0) for better form.
You shouldn't use magic numbers. Instead of 0, you should use the PLUGIN_CONTINUE constant.
Brad 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 23:36.


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