V-ADMIN HELP
#1

hi there all!

i am trying to add a part of the script where it saves the player colour

its going well!

but this is what i hve left over at the end of it all....

THE ERRORS

Код:
C:\Documents and Settings\Christopher\Desktop\stuff\Server\filterscripts\V-Admin.pwn(1027) : warning 211: possibly unintended assignment
C:\Documents and Settings\Christopher\Desktop\stuff\Server\filterscripts\V-Admin.pwn(1028) : error 029: invalid expression, assumed zero
THE PAWN CODE:

Код:
	if gPlayerLogged[playerid] = 1
  {
    new playername [ MAX_PLAYER_NAME ];
    GetPlayerName ( playerid , playername , MAX_PLAYER_NAME );

    if ( strcmp ( playername , "Slash01" , true ) == 0 )
    {
      SetPlayerColor ( playerid , 0xDDDD2357 );
    }
  }
	 }
	return 1;
please help me!!

thanks alot guys
Reply
#2

c-mon guys plz help!
Reply
#3

try this
pawn Код:
if(gPlayerLogged[playerid] == 1)
  {
    new playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername , MAX_PLAYER_NAME);
    if(strcmp(playername , "Slash01" , true) == 0)
    {
      SetPlayerColor ( playerid , 0xDDDD2357 );
      return 1;
    }
    }
    return 1;
and please do not double post the next time
Reply
#4

Код:
C:\Documents and Settings\Christopher\Desktop\stuff\Server\filterscripts\V-Admin.pwn(1027) : warning 217: loose indentation
C:\Documents and Settings\Christopher\Desktop\stuff\Server\filterscripts\V-Admin.pwn(1037) : warning 217: loose indentation
C:\Documents and Settings\Christopher\Desktop\stuff\Server\filterscripts\V-Admin.pwn(1039) : warning 209: function "OnPlayerSpawn" should return a value
C:\Documents and Settings\Christopher\Desktop\stuff\Server\filterscripts\V-Admin.pwn(1040) : error 054: unmatched closing brace ("}")
C:\Documents and Settings\Christopher\Desktop\stuff\Server\filterscripts\V-Admin.pwn(1041) : error 010: invalid function or declaration
errors

i just cant get it to work...
Reply
#5

try this:

Код:
if(gPlayerLogged[playerid] == 1)
  {
    new playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername , MAX_PLAYER_NAME);
    if(strcmp(playername , "Slash01" , true) == 0)
    {
      SetPlayerColor ( playerid , 0xDDDD2357 );
      return 1;
    }
  }
return 1;
}
Reply
#6

it didnt work, plzzzz help!
Reply
#7

error 054: unmatched closing brace ("}") means you have an extra '}' in your code, pressumably in "public OnPlayerSpawn(playerid)"
warning 209: function "OnPlayerSpawn" should return a value means in the callback for "OnPlayerSpawn" you either removed the "return 1;" line or you closed the callback to early

Example:
pawn Код:
public OnPlayerSpawn(playerid)
{
   If(PlayerIsHappy[playerid])
   {
     ClayPlayerHands(playerid);
   }
} //This is closing it off so that
return 1; //This is outside of OnPlayerSpawn now
}
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)