On Player Text 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)
+--- Thread: On Player Text Help (
/showthread.php?tid=405101)
On Player Text Help -
Joshman543 - 05.01.2013
PHP код:
if(Masked[playerid] == 1)
{
format(string, sizeof(string), "Stranger says, \"%s\"", text);
else format(string, sizeof(string), "Stranger says: [%s Accent] %s", PlayerInfo[playerid][pAccent], text);
}
When I try and compile after adding this code I get 26 errors saying undefined symbol.
This may be causing errors from the brackets:
PHP код:
CMD:mask(playerid, params[])
{
new randomID = random(200);
new string[35];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][pMasked] == 0;)
{
PlayerInfo[playerid][pMasked] = 1;
SetPlayerAttachedObject(playerid, 9, 19037, 2, 10, 4.7, 0.0, 90, 90, 0);//You can change this however you want, use sa-mp wiki for more info, right now is HockeyMask2
SendClientMessage(playerid, COLOR_WHITE, "You have put on a mask! (/mask to romove it)");
for(new i = 0; i < MAX_PLAYERS; i++)
{
ShowPlayerNameTagForPlayer(i, playerid, 0); // ShowPlayerNameTagForPlayer(i, playerid, 0) hide name for all players
}
}
else
{
PlayerInfo[playerid][pMasked] = 0;
SendClientMessage(playerid, COLOR_WHITE, "You have removed your mask!"); // This is message what was send when you remove your mask
if(IsPlayerAttachedObjectSlotUsed(playerid, 9))
{
RemovePlayerAttachedObject(playerid, 9);
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
ShowPlayerNameTagForPlayer(i, playerid, 1); // ShowPlayerNameTagForPlayer(i, playerid, 1) show name back.
}
}
return 1;
}
}
Код:
C:\Users\Aaron\Desktop\PDRPSERVER\gamemodes\PDRP.pwn(696) : error 017: undefined symbol "RPN"
C:\Users\Aaron\Desktop\PDRPSERVER\gamemodes\PDRP.pwn(697) : error 017: undefined symbol "SendRobberyMessage"
C:\Users\Aaron\Desktop\PDRPSERVER\gamemodes\PDRP.pwn(698) : error 017: undefined symbol "SendCopMessage"
C:\Users\Aaron\Desktop\PDRPSERVER\gamemodes\PDRP.pwn(716) : error 017: undefined symbol "IsACop"
C:\Users\Aaron\Desktop\PDRPSERVER\gamemodes\PDRP.pwn(720) : error 017: undefined symbol "IsACop"
C:\Users\Aaron\Desktop\PDRPSERVER\gamemodes\PDRP.pwn(723) : error 017: undefined symbol "GiveZaiatMoney"
C:\Users\Aaron\Desktop\PDRPSERVER\gamemodes\PDRP.pwn(861) : error 017: undefined symbol "IsPlayerLoggedIn"
C:\Users\Aaron\Desktop\PDRPSERVER\gamemodes\PDRP.pwn(906) : error 017: undefined symbol "cmd_hangup"
C:\Users\Aaron\Desktop\PDRPSERVER\gamemodes\PDRP.pwn(909) : error 017: undefined symbol "ResetZaiatWeapons"
C:\Users\Aaron\Desktop\PDRPSERVER\gamemodes\PDRP.pwn(1391) : error 017: undefined symbol "split"
C:\Users\Aaron\Desktop\PDRPSERVER\gamemodes\PDRP.pwn(1483) : error 017: undefined symbol "IsPlayerLoggedIn"
C:\Users\Aaron\Desktop\PDRPSERVER\gamemodes\PDRP.pwn(1488) : error 017: undefined symbol "RPNU"
C:\Users\Aaron\Desktop\PDRPSERVER\gamemodes\PDRP.pwn(1510) : error 017: undefined symbol "SaveZaiatAmmo"
C:\Users\Aaron\Desktop\PDRPSERVER\gamemodes\PDRP.pwn(1707) : error 017: undefined symbol "SaveToys"
C:\Users\Aaron\Desktop\PDRPSERVER\gamemodes\PDRP.pwn(1724) : error 017: undefined symbol "RPNU"
C:\Users\Aaron\Desktop\PDRPSERVER\gamemodes\PDRP.pwn(1952) : error 017: undefined symbol "LoadToys"
C:\Users\Aaron\Desktop\PDRPSERVER\gamemodes\PDRP.pwn(1960) : error 017: undefined symbol "RPN"
C:\Users\Aaron\Desktop\PDRPSERVER\gamemodes\PDRP.pwn(1975) : error 017: undefined symbol "RPN"
C:\Users\Aaron\Desktop\PDRPSERVER\gamemodes\PDRP.pwn(1976) : error 017: undefined symbol "SendAdminMessage"
C:\Users\Aaron\Desktop\PDRPSERVER\gamemodes\PDRP.pwn(1979) : error 017: undefined symbol "RPN"
C:\Users\Aaron\Desktop\PDRPSERVER\gamemodes\PDRP.pwn(1980) : error 017: undefined symbol "SendAdminMessage"
C:\Users\Aaron\Desktop\PDRPSERVER\gamemodes\PDRP.pwn(1984) : error 017: undefined symbol "RPN"
C:\Users\Aaron\Desktop\PDRPSERVER\gamemodes\PDRP.pwn(1985) : error 017: undefined symbol "SendAdminMessage"
C:\Users\Aaron\Desktop\PDRPSERVER\gamemodes\PDRP.pwn(2045) : error 017: undefined symbol "split"
C:\Users\Aaron\Desktop\PDRPSERVER\gamemodes\PDRP.pwn(2071) : error 017: undefined symbol "RHS"
C:\Users\Aaron\Desktop\PDRPSERVER\gamemodes\PDRP.pwn(2148) : error 017: undefined symbol "fcreate"
Re: On Player Text Help -
arakuta - 05.01.2013
You forgot the last bracket! You open 7 and close just 6.
Here you are.
pawn Код:
CMD:mask(playerid, params[])
{
new randomID = random(200);
new string[35];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][pMasked] == 0;)
{
PlayerInfo[playerid][pMasked] = 1;
SetPlayerAttachedObject(playerid, 9, 19037, 2, 10, 4.7, 0.0, 90, 90, 0);//You can change this however you want, use sa-mp wiki for more info, right now is HockeyMask2
SendClientMessage(playerid, COLOR_WHITE, "You have put on a mask! (/mask to romove it)");
for(new i = 0; i < MAX_PLAYERS; i++)
{
ShowPlayerNameTagForPlayer(i, playerid, 0); // ShowPlayerNameTagForPlayer(i, playerid, 0) hide name for all players
}
}
else
{
PlayerInfo[playerid][pMasked] = 0;
SendClientMessage(playerid, COLOR_WHITE, "You have removed your mask!"); // This is message what was send when you remove your mask
if(IsPlayerAttachedObjectSlotUsed(playerid, 9))
{
RemovePlayerAttachedObject(playerid, 9);
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
ShowPlayerNameTagForPlayer(i, playerid, 1); // ShowPlayerNameTagForPlayer(i, playerid, 1) show name back.
}
}
return 1;
}
}
}
Re: On Player Text Help -
RedCrossER - 05.01.2013
This happens mainly when you don't close your brackets so check for it first when you get like this errors.
Re: On Player Text Help -
Mr.Anonymous - 05.01.2013
Use Notepad++ to find missing braces more easily. See: