Error's unfixable..
#1

PHP код:
if(strcmp("/selfdestruction"cmdtexttrue) == 0)
{
    if(
IsPlayerConnected(playerid))
    {
        new 
pSkin;
        
pSkin GetPlayerSkin(playerid);
        
        if(
pSkin == 255))
        {
             new 
string[128];
             new 
sendername[MAX_PLAYER_NAME];
             
GetPlayerName(playeridstringsendername);
             
format(stringsizeof(string),"%s has activated Self-Destruction of the carrier, Use the door at the carrier to escape with the boats!"sendername);
             
SendClientMessageToAll(COLOR_RED1string);
             
CountDownTimer SetTimer("CountDown"30000false);
        }
     }
     else
     {
             
SendClientMessage(playeridCOLOR_WRONG"Player not Connected!");
     }
   return 
1;
}
     
     if(
strcmp("/makecaptain"cmdtexttrue) == 0)
{
    new 
targetid;
    if(
IsPlayerConnected(targetid))
    {
        if(
IsPlayerAdmin(playerid))
        {
            new 
pSkin;
            
pSkin GetPlayerSkin(playerid);
            if(
pSkin == 255))
            {
                new 
string[128];
                new 
sendername2[MAX_PLAYER_NAME];
                
GetPlayerName(playeridstringsendername2);
                
format(stringsizeof(string),"%s has made you a Captain, Don't abuse this position!"sendername2);
                
SetPlayerTeam(targetid0);
            }
        }
        else
        {
            
SendClientMessage(playeridCOLOR_WRONG"You are not an admin!");
        }
    }
    else
    {
        
SendClientMessage(playeridCOLOR_WRONG"Player Not Connected!");
    }
}
    return 
1;

I'm getting these errors :

Quote:

C:\Documents and Settings\Administrator\Bureaublad\Samp server\gamemodes\Carrier.pwn(396) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\Bureaublad\Samp server\gamemodes\Carrier.pwn(400) : error 035: argument type mismatch (argument 3)
C:\Documents and Settings\Administrator\Bureaublad\Samp server\gamemodes\Carrier.pwn(410) : warning 217: loose indentation
C:\Documents and Settings\Administrator\Bureaublad\Samp server\gamemodes\Carrier.pwn(413) : warning 217: loose indentation
C:\Documents and Settings\Administrator\Bureaublad\Samp server\gamemodes\Carrier.pwn(423) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\Bureaublad\Samp server\gamemodes\Carrier.pwn(427) : error 035: argument type mismatch (argument 3)
C:\Documents and Settings\Administrator\Bureaublad\Samp server\gamemodes\Carrier.pwn(442) : warning 217: loose indentation

Line 396 : if(pSkin == 255))
Line 400 : GetPlayerName(playerid, string, sendername);
Line 410 : return 1;
Line 413 : if(strcmp("/makecaptain", cmdtext, true) == 0)
Line 423 : if(pSkin == 255))
Line 427 : GetPlayerName(playerid, string, sendername2);
Line 442 : return 1;


String :

new string[128];
new sendername2[MAX_PLAYER_NAME];
GetPlayerName(playerid, string, sendername2);
format(string, sizeof(string),"%s has made you a Captain, Don't abuse this position!", sendername2);
SetPlayerTeam(targetid, 0);


Problem?
Reply
#2

nvm.
Reply
#3

if(pSkin == 255)) >> if(pSkin == 255)

GetPlayerName(playerid, sendername, MAX_PLAYER_NAME);
Reply
#4

here ya go
if get more errors..reply
pawn Код:
if(strcmp("/selfdestruction", cmdtext, true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(GetPlayerSkin(playerid) == 255)
{
new string[128];
new sendername[MAX_PLAYER_NAME];
new CountDownTimer;

GetPlayerName(playerid, string, sizeof(string));
format(string, sizeof(string),"%s has activated Self-Destruction of the carrier, Use the door at the carrier to escape with the boats!", sendername);
SendClientMessageToAll(COLOR_RED1, string);
CountDownTimer = SetTimer("CountDown", 30000, false);
}
}
else
{
SendClientMessage(playerid, COLOR_WRONG, "Player not Connected!");
}
return 1;
}

if(strcmp("/makecaptain", cmdtext, true) == 0)
{
new targetid;
if(IsPlayerConnected(targetid))
{
if(IsPlayerAdmin(playerid))
{
if(GetPlayerSkin(playerid) == 255)
{
new string[128];
new sendername2[MAX_PLAYER_NAME];
GetPlayerName(playerid, string, sizeof(string));
format(string, sizeof(string),"%s has made you a Captain, Don't abuse this position!", sendername2);
SetPlayerTeam(targetid, 0);
}
}
else
{
SendClientMessage(playerid, COLOR_WRONG, "You are not an admin!");
}
}
else
{
SendClientMessage(playerid, COLOR_WRONG, "Player Not Connected!");
}
return 1;
}
Reply
#5

EDIT: WORKS THANKS! Can you tell me what i did wrong?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)