HELP: Admin Stock/Chat errrors (++rep)[PLEASE HELP ME] - 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: HELP: Admin Stock/Chat errrors (++rep)[PLEASE HELP ME] (
/showthread.php?tid=499018)
HELP: Admin Stock/Chat errrors (++rep)[PLEASE HELP ME] -
ChristianIvann09 - 06.03.2014
Hi, so im having an Admin Chat script and when i compiled it i have this errors:
Код:
C:\Users\Cris\Desktop\0.3z Server\ASRP (LRP script)\gamemodes\ASRP_V2.0.pwn(960) : error 017: undefined symbol "pInfo"
C:\Users\Cris\Desktop\0.3z Server\ASRP (LRP script)\gamemodes\ASRP_V2.0.pwn(960) : warning 215: expression has no effect
C:\Users\Cris\Desktop\0.3z Server\ASRP (LRP script)\gamemodes\ASRP_V2.0.pwn(960) : error 001: expected token: ";", but found "]"
C:\Users\Cris\Desktop\0.3z Server\ASRP (LRP script)\gamemodes\ASRP_V2.0.pwn(960) : error 029: invalid expression, assumed zero
C:\Users\Cris\Desktop\0.3z Server\ASRP (LRP script)\gamemodes\ASRP_V2.0.pwn(960) : fatal error 107: too many error messages on one line
Код:
Line 960: if(pInfo[i][pAdmin] >= 1)
Код:
Full Code:
forward SendAdminMessage(color, string[]);
public SendAdminMessage(color, string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(pInfo[i][pAdmin] >= 1)
{
SendClientMessage(i, color, string);
}
if(pInfo[i][pAdmin] >= 2)
{
SendClientMessage(i, color, string);
}
if(pInfo[i][pAdmin] >= 3)
{
SendClientMessage(i, color, string);
}
if(pInfo[i][pAdmin] >= 4)
{
SendClientMessage(i, color, string);
}
if(pInfo[i][pAdmin] >= 5)
{
SendClientMessage(i, color, string);
}
if(pInfo[i][pAdmin] >= 6)
{
SendClientMessage(i, color, string);
}
}
}
}
Код:
Admin Chat Full Code:
CMD:admin(playerid, params[])
{
if(pInfo[playerid][pAdmin] == 1)
{
new string[128];
if(isnull(params))
return SendClientMessage(playerid, -1, "USAGE: /a(dmin) [text]");
format(string, sizeof(string), " moderator %s : %s", GetPlayerNameEx(playerid), params);
SendAdminMessage(0xF2FF00FF, string);
}
if(pInfo[playerid][pAdmin] == 2)
{
new string[128];
if(isnull(params))
return SendClientMessage(playerid, -1, "USAGE: /a(dmin) [text]");
format(string, sizeof(string), " Junior admin %s : %s", GetPlayerNameEx(playerid), params);
SendAdminMessage(0xF2FF00FF, string);
}
if(pInfo[playerid][pAdmin] == 3)
{
new string[128];
if(isnull(params))
return SendClientMessage(playerid, -1, "USAGE: /a(dmin) [text]");
format(string, sizeof(string), " General Admin %s : %s", GetPlayerNameEx(playerid), params);
SendAdminMessage(0xF2FF00FF, string);
}
if(pInfo[playerid][pAdmin] == 4)
{
new string[128];
if(isnull(params))
return SendClientMessage(playerid, -1, "USAGE: /a(dmin) [text]");
format(string, sizeof(string), " Senior Admin %s : %s", GetPlayerNameEx(playerid), params);
SendAdminMessage(0xF2FF00FF, string);
}
if(pInfo[playerid][pAdmin] == 1337)
{
new string[128];
if(isnull(params))
return SendClientMessage(playerid, -1, "USAGE: /a(dmin) [text]");
format(string, sizeof(string), " Head Admin %s : %s", GetPlayerNameEx(playerid), params);
SendAdminMessage(0xF2FF00FF, string);
}
if(pInfo[playerid][pAdmin] == 99999)
{
new string[128];
if(isnull(params))
return SendClientMessage(playerid, -1, "USAGE: /a(dmin) [text]");
format(string, sizeof(string), " Community Owner %s : %s", GetPlayerNameEx(playerid), params);
SendAdminMessage(0xF2FF00FF, string);
}
return 1;
}
THANKS
Re: HELP: Admin Stock/Chat errrors (++rep)[PLEASE HELP ME] -
Ryan_Undering - 06.03.2014
Mind posting your define on pInfo? Seems to be the root of the problem
Re: HELP: Admin Stock/Chat errrors (++rep)[PLEASE HELP ME] -
XK - 06.03.2014
You have another thing used for pinfo,may you post it,or post a your /kick command