V-ADMIN HELP - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: V-ADMIN HELP (
/showthread.php?tid=90717)
V-ADMIN HELP -
wilcock33 - 09.08.2009
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
Re: V-ADMIN HELP -
wilcock33 - 09.08.2009
c-mon guys plz help!
Re: V-ADMIN HELP -
James_Alex - 09.08.2009
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
Re: V-ADMIN HELP -
wilcock33 - 09.08.2009
Код:
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...
Re: V-ADMIN HELP -
LuxurioN™ - 09.08.2009
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;
}
Re: V-ADMIN HELP -
wilcock33 - 09.08.2009
it didnt work, plzzzz help!
Re: V-ADMIN HELP -
Joe Staff - 09.08.2009
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
}