SA-MP Forums

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

 
 
Thread Tools Display Modes
Old 18/03/2009, 07:57 PM   #1
ryoere2k8
Little Clucker
 
Join Date: Jun 2008
Posts: 34
Reputation: 0
Default Problem

Hey I'm a beginner scripter and I tried to modify /pstats a bit on SeifAdmin.

pawn Code:
if(strcmp(cmd, "/stats", true) == 0) // See a players stats
        {
          tmp = strtok(cmdtext, idx);
            if(!strlen(tmp)) return SendClientMessage(playerid, ORANGE, "USAGE: /stats [playername/id]");
            new targetid = ReturnUser(tmp);
            if (targetid != INVALID_PLAYER_ID)
            {
                new Float:health,Float:armor;
                GetPlayerHealth(targetid,health);
                GetPlayerArmour(targetid,armor);
            GetPlayerName(targetid, giveplayername, sizeof(giveplayername));
                format(string, sizeof(string), "=[Pure Everything Stats For %s]=",giveplayername, health,GetPlayerMoney(targetid),AccountInfo[targetid][Warns],armor);
                SendClientMessage(playerid,RED,string);
                if(AccountInfo[giveplayerid][Logged] == 1) SendClientMessage(playerid, PURPLE, "=[Logged In: Yes]=");
                else if(AccountInfo[giveplayerid][Logged] == 0) SendClientMessage(playerid, PURPLE, "=[Logged In: No]=");
                format(string, sizeof(string), "=[AdminLevel:%d]",AccountInfo[AdminLevel]);
                SendClientMessage(playerid,RED,string);
            }
            else SendClientMessage(playerid, RED, "Player is not active.");
        }
        return 1;

So, Thats what I had did so far so i decided to test that, I couldn't /login even though I got 0 errors
this is all that comes up
Code:
\filterscripts\SeifAdmin.pwn(1977) : warning 217: loose indentation
\filterscripts\SeifAdmin.pwn(1992) : warning 213: tag mismatch
\filterscripts\SeifAdmin.pwn(1997) : warning 217: loose indentation
\filterscripts\SeifAdmin.pwn(1998) : warning 225: unreachable code
\filterscripts\SeifAdmin.pwn(1998) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


5 Warnings.
Plz help I want to get this working so I can try to add more
oh by the way I removed the IsPlayerAdmin cause i wanted to make it into a cmd that players could do.
ryoere2k8 is offline  
Old 18/03/2009, 07:58 PM   #2
ryoere2k8
Little Clucker
 
Join Date: Jun 2008
Posts: 34
Reputation: 0
Default Re: Problem

Sorry for double post >.<
ryoere2k8 is offline  
Old 18/03/2009, 08:13 PM   #3
ryoere2k8
Little Clucker
 
Join Date: Jun 2008
Posts: 34
Reputation: 0
Default Re: Problem

Anyone?
ryoere2k8 is offline  
Old 18/03/2009, 08:32 PM   #4
ryoere2k8
Little Clucker
 
Join Date: Jun 2008
Posts: 34
Reputation: 0
Default Re: Problem

Please help I really need this.
ryoere2k8 is offline  
Old 18/03/2009, 08:35 PM   #5
Pyrokid
Huge Clucker
 
Join Date: May 2006
Posts: 482
Reputation: 0
Default Re: Problem

Don't quadruple post...

What are lines 1992 and 1998?
Pyrokid is offline  
Old 18/03/2009, 08:44 PM   #6
Danut
Gangsta
 
Join Date: Aug 2008
Posts: 534
Reputation: 0
Default Re: Problem

http://pastebin.com/m79a217a6
Danut is offline  
Old 18/03/2009, 08:46 PM   #7
Pyrokid
Huge Clucker
 
Join Date: May 2006
Posts: 482
Reputation: 0
Default Re: Problem

What are the exact lines of the problems?
Pyrokid is offline  
Old 18/03/2009, 08:47 PM   #8
Danut
Gangsta
 
Join Date: Aug 2008
Posts: 534
Reputation: 0
Default Re: Problem

Quote:
Originally Posted by [Fackin'
Pyro ]
What are the exact lines of the problems?
don't double post
Danut is offline  
Old 18/03/2009, 08:49 PM   #9
Pyrokid
Huge Clucker
 
Join Date: May 2006
Posts: 482
Reputation: 0
Default Re: Problem

Quote:
Originally Posted by MoroJr™
Quote:
Originally Posted by [Fackin'
Pyro ]
What are the exact lines of the problems?
don't double post
Who the fuck double posted?
Pyrokid is offline  
Old 18/03/2009, 09:23 PM   #10
ryoere2k8
Little Clucker
 
Join Date: Jun 2008
Posts: 34
Reputation: 0
Default Re: Problem

Quote:
Originally Posted by [Fackin'
Pyro ]
Quote:
Originally Posted by MoroJr™
Quote:
Originally Posted by [Fackin'
Pyro ]
What are the exact lines of the problems?
don't double post
Who the fuck double posted?
line 1992 format(string, sizeof(string), "=[AdminLevel:%d]",AccountInfo[AdminLevel]);
line 1998 if(strcmp(cmd, "/fuck", true) == 0) // Sends a player in the air and explodes
ryoere2k8 is offline  
 

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 10:09 PM.


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