Raised This Month: $ Target: $400
 0% 

[help with my plugin]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Xevious
Senior Member
Join Date: Sep 2009
Location: Computer Chair
Old 10-09-2009 , 20:48   [help with my plugin]
Reply With Quote #1

It compiled successfully but 1 error occur.
[Frozener(3 Warning 209 function cmd_fro should return a value


PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

#define PLUGIN "Frozener"
#define VERSION "1.0"
#define AUTHOR "Xevious"


public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_concmd("amx_fro""cmd_fro"ADMIN_SLAY"<target>")
}

public 
cmd_fro(idlevelcid)
{
    if (!
cmd_access(idlevelcid3))
        return 
PLUGIN_HANDLED

    
    
new Arg1[24]
    
read_argv(1Arg123)
    
    new 
player cmd_target(idArg11)
    
    if (!
player)
    {
        
console_print(id"Sorry, player %s could not be found or targetted!"Arg1)
        return 
PLUGIN_HANDLED
    

    else 
    {
        
set_pev(playerpev_flagspev(playerpev_flags) | FL_FROZEN
    }

__________________
Nothing possible when you are not hardworking
Xevious is offline
Send a message via MSN to Xevious
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 10-09-2009 , 20:50   Re: [help with my plugin]
Reply With Quote #2

add a return PLUGIN_HANDLED; directly above the last }

Code:
// ...     else     {         set_pev(player, pev_flags, pev(player, pev_flags) | FL_FROZEN)     }     return PLUGIN_HANDLED }
__________________
Bugsy is offline
Xevious
Senior Member
Join Date: Sep 2009
Location: Computer Chair
Old 10-09-2009 , 22:16   Re: [help with my plugin]
Reply With Quote #3

added return PLUGIN_HANDLED
It compiled, but one error occur again

warning 217: loose indentation at line (39)
__________________
Nothing possible when you are not hardworking
Xevious is offline
Send a message via MSN to Xevious
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 10-09-2009 , 22:19   Re: [help with my plugin]
Reply With Quote #4

Quote:
Originally Posted by Xevious View Post
added return PLUGIN_HANDLED
It compiled, but one error occur again

warning 217: loose indentation at line (39)
So do what the warning is telling you and fix the indenting. Nobody should need help doing this.

Here's an example for you, blah2() is a loose indent:
Code:
new var1; new var2; if ( var1 == 5 ) {       blah();         blah2();       blah3(); }
__________________
Bugsy is offline
Old 10-09-2009, 22:19
Asd'
This message has been deleted by Asd'.
Xevious
Senior Member
Join Date: Sep 2009
Location: Computer Chair
Old 10-09-2009 , 22:25   Re: [help with my plugin]
Reply With Quote #5

thank bugsy and Asd' , now i know what is loose identition

FULLY COMPILED ERROR SOLVED
__________________
Nothing possible when you are not hardworking

Last edited by Xevious; 10-10-2009 at 00:38.
Xevious is offline
Send a message via MSN to Xevious
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 22:36.


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