Raised This Month: $ Target: $400
 0% 

[SOLVED] LOOSE IDENTATION


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
flamin
BANNED
Join Date: Jul 2009
Location: Los Teques
Old 05-02-2010 , 21:53   [SOLVED] LOOSE IDENTATION
Reply With Quote #1

Hi! This time i come to assist me to settle these warnings in this code:

PHP Code:
public handle_say(id)
{
    static 
arg[192]
    
read_args(arg,191)
    
remove_quotes(arg)

    new 
sw 0
    
new i0
    
new j
    
new g_words[][] ={ "ready","gaben","notready","dmg","sum","hp","help" }

    if ( 
arg[0] == '.' || arg[0] == '!' )
        { 
          do{    
           
            if( 
equal(arg], g_words]) )
            {
                    
sw 1
                    j 
0
                    client_cmd
(id,arg); 
                    return 
PLUGIN_CONTINUE
            }
            else{
                    
sw 0
                    i
++
            }
              }while(
sw || sizeof(g_words))

            
client_cmd(id,arg); 
            return 
PLUGIN_HANDLED;
        }
    return 
PLUGIN_CONTINUE;

The warnings are in the image...
Attached Thumbnails
Click image for larger version

Name:	help.JPG
Views:	111
Size:	65.7 KB
ID:	64936  
flamin is offline
Kreation
Veteran Member
Join Date: Jan 2010
Location: Illinois
Old 05-02-2010 , 22:01   Re: WARNINGS COMPILE
Reply With Quote #2

You're setting sw = 0 and to 1 but you do nothing with it. You just set it. What is the point? Or is there more code that you are just not providing that uses the variable sw and j?
__________________
Hi.
Kreation is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-02-2010 , 22:19   Re: WARNINGS COMPILE
Reply With Quote #3

It's because he is using inefficient code that was posted in another thread. Do you know liryck? He speak english much much better than you.
__________________
fysiks is offline
flamin
BANNED
Join Date: Jul 2009
Location: Los Teques
Old 05-02-2010 , 22:27   Re: WARNINGS COMPILE
Reply With Quote #4

Quote:
Originally Posted by Kreation View Post
You're setting sw = 0 and to 1 but you do nothing with it. You just set it. What is the point? Or is there more code that you are just not providing that uses the variable sw and j?
Only the i'm using in that part of the code

Quote:
It's because he is using inefficient code that was posted in another thread. Do you know liryck? He speak english much much better than you.
Which is the problem who speaks English better than i do?
flamin is offline
Kreation
Veteran Member
Join Date: Jan 2010
Location: Illinois
Old 05-02-2010 , 22:29   Re: WARNINGS COMPILE
Reply With Quote #5

Quote:
Originally Posted by flamin View Post
Only the i'm using in that part of the code
Well, I tried to make sense of why you are even using pointless variables if they do nothing and got a headache. *Sigh of Depression*

Just delete the variables sw and j if they do ABSOLUTELY nothing..
__________________
Hi.
Kreation is offline
Old 05-02-2010, 22:38
wrecked_
This message has been deleted by wrecked_. Reason: nvm
flamin
BANNED
Join Date: Jul 2009
Location: Los Teques
Old 05-02-2010 , 22:41   Re: WARNINGS COMPILE
Reply With Quote #7

Thanks kreation tapeworms reason i have already eliminated the variables...

Now i have is a problem of loose identation, here is the image...

And this is the line where this error:

PHP Code:
              }while( sizeof(g_words))

            
client_cmd(id,arg); 
            return 
PLUGIN_HANDLED;
        } 
Attached Thumbnails
Click image for larger version

Name:	help.JPG
Views:	167
Size:	46.2 KB
ID:	64941  
flamin is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-02-2010 , 22:53   Re: WARNINGS COMPILE
Reply With Quote #8

I already posted a much better loop in the thread by liryck in Scripting Help.
__________________
fysiks is offline
flamin
BANNED
Join Date: Jul 2009
Location: Los Teques
Old 05-02-2010 , 23:10   Re: WARNINGS COMPILE
Reply With Quote #9

Fysiks i have already tested the code that will make provided to lyrick and does not work in this code only faltaria fix the problem of loose identation you can help to finish?
flamin is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-03-2010 , 00:09   Re: WARNINGS COMPILE
Reply With Quote #10

Quote:
Originally Posted by flamin View Post
can help to finish?
Tihs is the olny prat I udnersotod. The asnwer is "It's impossible."
__________________
fysiks 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 03:52.


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