undefined symbol sendername - 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: undefined symbol sendername (
/showthread.php?tid=259963)
undefined symbol sendername -
SpankMe2 - 06.06.2011
pawn Код:
if (strcmp("/admins", cmdtext, true) == 0)
{
if(IsPlayerConnected(playerid))
{
SendClientMessage(playerid, COLOR_PINK, ".::[ Name of script isnt to be mentioned ]::.");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdminLevel] >= 1 && PlayerInfo[i][pAdminLevel] <= 11
{
new printtext[64];
{
if(PlayerInfo[i][pAdminLevel] == 11) { printtext = "Owner / Scripter"; }
else if(PlayerInfo[i][pAdminLevel] == 10) { printtext = "Co Owner"; }
else if(PlayerInfo[i][pAdminLevel] == 9) { printtext = "Senior Administrator"; }
else if(PlayerInfo[i][pAdminLevel] == 7) { printtext = "Main Administrator"; }
else if(PlayerInfo[i][pAdminLevel] == 6) { printtext = "Administrator"; }
else if(PlayerInfo[i][pAdminLevel] == 5) { printtext = "Trail Administrator"; }
else if(PlayerInfo[i][pAdminLevel] == 4) { printtext = "Senior Moderator"; }
else if(PlayerInfo[i][pAdminLevel] == 3) { printtext = "Moderator"; }
else if(PlayerInfo[i][pAdminLevel] == 2) { printtext = "Trail Moderator"; }
else if(PlayerInfo[i][pAdminLevel] == 1) { printtext = "Suspended Admin"; }
else { printtext = "Unknown Rank"; }
}
GetPlayerName(i, sendername, sizeof(sendername));
{
format(string, sizeof(string), "%s - %s", printtext, sendername);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
}
}
}
}
return 1;
}
I know this is somthing stupid to get stuck on but im stuck heres my errors
pawn Код:
(471) : error 029: invalid expression, assumed zero
(486) : warning 217: loose indentation
(486) : error 017: undefined symbol "sendername"
(486) : error 017: undefined symbol "sendername"
(486) : error 029: invalid expression, assumed zero
(486) : fatal error 107: too many error messages on one line
im not saying the script name as im making a grand relase
Re: undefined symbol sendername -
Mean - 06.06.2011
Put
pawn Код:
new sendername[ MAX_PLAYER_NAME ];
Above
pawn Код:
GetPlayerName(i, sendername, sizeof(sendername));
Respuesta: undefined symbol sendername -
Lunnatiicz - 06.06.2011
pawn Код:
new sendername[MAX_PLAYER_NAME];
Var global
Re: undefined symbol sendername -
PrawkC - 06.06.2011
I'd just add this stock
Код:
stock Name(playerid)
{
new string[72];
GetPlayerName(playerid, string, sizeof(string));
return string;
}
then itstead of doing sendername, put Name(i);
Re: undefined symbol sendername -
SpankMe2 - 06.06.2011
lol thanks i forgot to define it been a long time since i scripted last using all old methods then once server is done im going to update it all or try thats my plan anyway
also PrawC or somthing i dont want to do that becuse i have lines more than that with that deinition and loads of things with sendername2 and i dont want to mess it up thanks anyway