SA-MP Forums Archive
ErRoR - 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: ErRoR (/showthread.php?tid=65672)



ErRoR - My_Waffles_Bitch_L0L - 15.02.2009

this is my prob:

Код:
public OnPlayerText(playerid, text[])
{
  if(PlayerData[playerid][Muted] == 1)
{
return 0;
}

  if(PlayerData[playerid][AdminLevel] >= 1 && text[0]=='#')
{
new string[256],name[24]; GetPlayerName(playerid,name,24);
format(string,256,"[ADMIN] %s: %s",name,text[1]);
AdminMessage(COLOR_GREEN, string);
}
  return 0;
}

  if(PlayerData[playerid][AdminLevel]>=1 || PlayerData[playerid][VIP]==1 && text[0]=='@')
{
format(string,256,"[ADMIN] %s: %s",name,text[1]);
AdminMessage(COLOR_GREEN, string);
}
return 0;
}
and this is my errors:

Код:
C:\Users\Martin\Desktop\PUTDETHERINTILSA-MP\WafflesAdmin.pwn(64) : error 010: invalid function or declaration
C:\Users\Martin\Desktop\PUTDETHERINTILSA-MP\WafflesAdmin.pwn(68) : error 054: unmatched closing brace ("}")
C:\Users\Martin\Desktop\PUTDETHERINTILSA-MP\WafflesAdmin.pwn(69) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.



Re: ErRoR - Backwardsman97 - 15.02.2009

Read the pawn pdf and learn how to indent?

pawn Код:
public OnPlayerText(playerid, text[])
{
    if(PlayerData[playerid][Muted] == 1)
    {
        return 0;
    }
    new string[128],name[24];
    GetPlayerName(playerid,name,24);
    if(PlayerData[playerid][AdminLevel] >= 1 && text[0]=='#')
    {
        format(string,256,"[ADMIN] %s: %s",name,text[1]);
        AdminMessage(COLOR_GREEN, string);
        return 0;
    }
    if(PlayerData[playerid][AdminLevel]>=1 || PlayerData[playerid][VIP]==1 && text[0]=='@')
    {
        format(string,256,"[ADMIN] %s: %s",name,text[1]);
        AdminMessage(COLOR_GREEN, string);
    }
    return 1;
}
Try that. There are many things wrong with your code that it is almost unclear what you're trying to do.


Re: ErRoR - [RP]Rav - 15.02.2009

try this too

replace
Код:
if(PlayerData[playerid][AdminLevel]>=1 || PlayerData[playerid][VIP]==1 && text[0]=='@')
with
Код:
if((PlayerData[playerid][AdminLevel]>=1 || PlayerData[playerid][VIP]==1) && text[0]=='@')
or else admins are stuck in admin/vip chat


Re: ErRoR - My_Waffles_Bitch_L0L - 15.02.2009

i need help, i posted in the script request thread, help? :P