SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 20/03/2017, 03:19 PM   #1
Langky
Little Clucker
 
Langky's Avatar
 
Join Date: Feb 2017
Location: Indonesia
Posts: 41
Reputation: 0
Default Help me

LuxAdmin.pwn(5621) : warning 217: loose indentation
PHP Code:
#pragma unused params
        
new Counti;
          new 
string[128];
        new 
adminname[MAX_PLAYER_NAME];
        
SendClientMessage(playeridgreen" ");
         
SendClientMessage(playeridgreen"_________ |- Online Vip Member -| _________");
        
SendClientMessage(playeridgreen" ");
          for(
0MAX_PLAYERSi++)
        if(
IsPlayerConnected(i) && AccInfo[i][pVip] > 0)
        
Count++;

        for(
0MAX_PLAYERSi++)
            if(
IsPlayerConnected(i) && AccInfo[i][pVip] > 0)
            {
                if(
AccInfo[i][pVip] > 0)
                {
                    switch(
AccInfo[i][pVip])
                    {
                    case 
1AccType "Silver";
                    case 
2AccType "Gold";
                    case 
3AccType "Premium";
                    }
                }
                 
GetPlayerName(iadminnamesizeof(adminname));
                {
                    
format(stringsizeof(string), "%s (Id:%i) | %s",PlayerName2(i),i,AccType);
                    
SendClientMessage(playerid,yellow,string);
                }
            }
                if(
Count == 0)
            return 
SendClientMessage(playerid,red"No players have VIP Account!");
            
SendClientMessage(playeridgreen" _______________________________________");
            return 
1;

__________________
Langky is offline   Reply With Quote
Old 20/03/2017, 03:23 PM   #2
Mencent
High-roller
 
Mencent's Avatar
 
Join Date: Mar 2015
Location: Lower Saxony (Niedersachsen)
Posts: 1,308
Reputation: 92
Default Re: Help me

Hello!

You get this warning when you have something like this:
PHP Code:
SendClientMessage(playerid,-1,"This is a test message.");
      return 
1
This is wrong.

PHP Code:
SendClientMessage(playerid,-1,"This is a test message.");
return 
1
That's correct.

Try to find this mistake.
__________________
Best wishes,
Mencent

(Sorry for my bad english, I hope you can understand this!)
Mencent is online now   Reply With Quote
Old 20/03/2017, 03:25 PM   #3
RyderX
Banned
 
Join Date: Oct 2016
Location: Lebanon,Beirut Rank: SA-MP Scripter
Posts: 609
Reputation: 53
Default Re: Help me

Here you go
PHP Code:
#pragma unused params 
        
new Counti
        new 
string[128]; 
        new 
adminname[MAX_PLAYER_NAME]; 
        
SendClientMessage(playeridgreen" "); 
        
SendClientMessage(playeridgreen"_________ |- Online Vip Member -| _________"); 
        
SendClientMessage(playeridgreen" "); 
        for(
0MAX_PLAYERSi++) 
        if(
IsPlayerConnected(i) && AccInfo[i][pVip] > 0
        
Count++; 

        for(
0MAX_PLAYERSi++) 
            if(
IsPlayerConnected(i) && AccInfo[i][pVip] > 0
            { 
                if(
AccInfo[i][pVip] > 0
                { 
                    switch(
AccInfo[i][pVip]) 
                    { 
                    case 
1AccType "Silver"
                    case 
2AccType "Gold"
                    case 
3AccType "Premium"
                    } 
                } 
                 
GetPlayerName(iadminnamesizeof(adminname)); 
                { 
                    
format(stringsizeof(string), "%s (Id:%i) | %s",PlayerName2(i),i,AccType); 
                    
SendClientMessage(playerid,yellow,string); 
                } 
            } 
            if(
Count == 0
            return 
SendClientMessage(playerid,red"No players have VIP Account!"); 
            
SendClientMessage(playeridgreen" _______________________________________"); 
            return 
1

RyderX is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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



All times are GMT. The time now is 05:59 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.