Raised This Month: $12 Target: $400
 3% 

Expected but found end of file


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ConManKilla07
BANNED
Join Date: Aug 2006
Old 08-11-2006 , 08:11   Expected but found end of file
Reply With Quote #1

I seem to be getting an error here, expected but found end of file . Does anyone know why this is ? I cant seem to figure it out . Then when I try to move the bracket it says that it isn't returing a value . Please Help
Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #define PLUGIN "BattleFieldSouns2" #define VERSION "1.0" #define AUTHOR "ConManKilla07" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_concmd("amx_battlefield_sounds"  , "battlefield_sounds"  , ADMIN_LEVEL_B, "Turns The Sounds On And Off")     register_cvar("amx_battlefield_sounds2",  "1")     set_task(5.0, "battlefield_sounds", 0 ,"", 0, "b" ) } public plugin_precache()     {         precache_sound("misc/battlefield8.wav") } public battlefield_sounds(id) {     if (get_cvar_num("amx_battlefield_sounds2")==0)     {   client_print(id , print_chat , "[BattleField MOD] Sounds Are Disabled!")         return PLUGIN_HANDLED     }     else     {      client_print(id , print_chat , "[BattleField MOD] Sounds Are Now Activated!")      emit_sound(id,CHAN_AUTO, "misc/battlefield8.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)     return  PLUGIN_HANDLED }
ConManKilla07 is offline
Gizmo
Senior Member
Join Date: May 2006
Location: Sweden
Old 08-11-2006 , 08:24   Re: Expected but found end of file
Reply With Quote #2

Code:
public battlefield_sounds(id) {     if (get_cvar_num("amx_battlefield_sounds2")==0)     {         client_print(id , print_chat , "[BattleField MOD] Sounds Are Disabled!")         return PLUGIN_HANDLED     }     else     {         client_print(id , print_chat , "[BattleField MOD] Sounds Are Now Activated!")         emit_sound(id,CHAN_AUTO, "misc/battlefield8.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)     return  PLUGIN_HANDLED }
can you se the error now?

Code:
public battlefield_sounds(id) {     if (get_cvar_num("amx_battlefield_sounds2")==0)     {         client_print(id , print_chat , "[BattleField MOD] Sounds Are Disabled!")         return PLUGIN_HANDLED     }     else     {         client_print(id , print_chat , "[BattleField MOD] Sounds Are Now Activated!")         emit_sound(id,CHAN_AUTO, "misc/battlefield8.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)     }     return  PLUGIN_HANDLED }
this is correct, you forgot 1 bracket
__________________
Gizmo is offline
ConManKilla07
BANNED
Join Date: Aug 2006
Old 08-11-2006 , 08:30   Re: Expected but found end of file
Reply With Quote #3

OOOH . Thank you I see what I did wrong now . Thank you! + karma!
ConManKilla07 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 20:43.


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