error 028: invalid subscript (not an array or too many subscripts):"pInfo"
#1

C:\Users\User.User-PC\Downloads\JakartaGamers-Roleplay-v1.6.0\JakartaGamers Roleplay\Aman\gamemodes\a.pwn(37649) : error 028: invalid subscript (not an array or too many subscripts): "pInfo"
C:\Users\User.User-PC\Downloads\JakartaGamers-Roleplay-v1.6.0\JakartaGamers Roleplay\Aman\gamemodes\a.pwn(37649) : warning 215: expression has no effect
C:\Users\User.User-PC\Downloads\JakartaGamers-Roleplay-v1.6.0\JakartaGamers Roleplay\Aman\gamemodes\a.pwn(37649) : error 001: expected token: ";", but found "]"
C:\Users\User.User-PC\Downloads\JakartaGamers-Roleplay-v1.6.0\JakartaGamers Roleplay\Aman\gamemodes\a.pwn(37649) : error 029: invalid expression, assumed zero
C:\Users\User.User-PC\Downloads\JakartaGamers-Roleplay-v1.6.0\JakartaGamers Roleplay\Aman\gamemodes\a.pwn(37649) : fatal error 107: too many error messages on one line

Code CMD:admins

Код:
CMD:admins(playerid, params[])
{
	new string[128];
	foreach(new i : Player)
	{
		if(pInfo[i][pAdmin] > 0 && pInfo[i][pHide] == 0)
		{
	        if(PlayerData[i][pAdminDuty]) format(string,sizeof(string), "%s(%s): %s(ID: %i) Status: {4BB74C}Administrating", ReturnName(i, 0), PlayerData[i][pAdmin],string);
			else format(string,sizeof(string), "%s(%s): %s(ID: %i) Status: {FF0000}Roleplaying", ReturnName(i, 0), PlayerData[i][pAdmin],string);
		}
		else format(string,sizeof(string), "There's no online Administrators.");
	}
	ShowPlayerDialog(playerid, AdminList, DIALOG_STYLE_TABLIST, "Adminitrators", string, "OK", "");
	return 1;
}
Error COde
Код:
if(pInfo[i][pAdmin] > 0 && pInfo[i][pHide] == 0)
Reply
#2

Quote:
Originally Posted by Tihoy232
Посмотреть сообщение
C:\Users\User.User-PC\Downloads\JakartaGamers-Roleplay-v1.6.0\JakartaGamers Roleplay\Aman\gamemodes\a.pwn(37649) : error 028: invalid subscript (not an array or too many subscripts): "pInfo"
C:\Users\User.User-PC\Downloads\JakartaGamers-Roleplay-v1.6.0\JakartaGamers Roleplay\Aman\gamemodes\a.pwn(37649) : warning 215: expression has no effect
C:\Users\User.User-PC\Downloads\JakartaGamers-Roleplay-v1.6.0\JakartaGamers Roleplay\Aman\gamemodes\a.pwn(37649) : error 001: expected token: ";", but found "]"
C:\Users\User.User-PC\Downloads\JakartaGamers-Roleplay-v1.6.0\JakartaGamers Roleplay\Aman\gamemodes\a.pwn(37649) : error 029: invalid expression, assumed zero
C:\Users\User.User-PC\Downloads\JakartaGamers-Roleplay-v1.6.0\JakartaGamers Roleplay\Aman\gamemodes\a.pwn(37649) : fatal error 107: too many error messages on one line

Code CMD:admins

Код:
CMD:admins(playerid, params[])

{
	new string[128];
	foreach(new i : Player)
	{
		if(pInfo[i][pAdmin] > 0 && pInfo[i][pHide] == 0)
		{
	        if(PlayerData[i][pAdminDuty]) format(string,sizeof(string), "%s(%s): %s(ID: %i) Status: {4BB74C}Administrating", ReturnName(i, 0), PlayerData[i][pAdmin],string);
			else format(string,sizeof(string), "%s(%s): %s(ID: %i) Status: {FF0000}Roleplaying", ReturnName(i, 0), PlayerData[i][pAdmin],string);
		}
		else format(string,sizeof(string), "There's no online Administrators.");
	}
	ShowPlayerDialog(playerid, AdminList, DIALOG_STYLE_TABLIST, "Adminitrators", string, "OK", "");
	return 1;
}
Error COde
Код:
if(pInfo[i][pAdmin] > 0 && pInfo[i][pHide] == 0)
Код:
CMD:admins(playerid, params[])
{
	new string[128];
	foreach(new i : Player)
	{
		if(PlayerData[i][pAdmin] > 0 && pInfo[i][pHide] == 0)
		{
	        if(PlayerData[i][pAdminDuty]) format(string,sizeof(string), "%s(%s): %s(ID: %i) Status: {4BB74C}Administrating", ReturnName(i, 0), PlayerData[i][pAdmin],string);
			else format(string,sizeof(string), "%s(%s): %s(ID: %i) Status: {FF0000}Roleplaying", ReturnName(i, 0), PlayerData[i][pAdmin],string);
		}
		else format(string,sizeof(string), "There's no online Administrators.");
	}
	ShowPlayerDialog(playerid, AdminList, DIALOG_STYLE_TABLIST, "Adminitrators", string, "OK", "");
	return 1;
}
or
Код:
CMD:admins(playerid, params[])
{
	new string[128];
	foreach(new i : Player)
	{
		if(PlayerData[i][pAdmin] > 0 && PlayerData[i][pHide] == 0)
		{
	        if(PlayerData[i][pAdminDuty]) format(string,sizeof(string), "%s(%s): %s(ID: %i) Status: {4BB74C}Administrating", ReturnName(i, 0), PlayerData[i][pAdmin],string);
			else format(string,sizeof(string), "%s(%s): %s(ID: %i) Status: {FF0000}Roleplaying", ReturnName(i, 0), PlayerData[i][pAdmin],string);
		}
		else format(string,sizeof(string), "There's no online Administrators.");
	}
	ShowPlayerDialog(playerid, AdminList, DIALOG_STYLE_TABLIST, "Adminitrators", string, "OK", "");
	return 1;
}
Reply
#3

C:\Users\User.User-PC\Downloads\JakartaGamers-Roleplay-v1.6.0\JakartaGamers Roleplay\Aman\gamemodes\a.pwn(37650) : error 017: undefined symbol "PlayerData"
C:\Users\User.User-PC\Downloads\JakartaGamers-Roleplay-v1.6.0\JakartaGamers Roleplay\Aman\gamemodes\a.pwn(37650) : warning 215: expression has no effect
C:\Users\User.User-PC\Downloads\JakartaGamers-Roleplay-v1.6.0\JakartaGamers Roleplay\Aman\gamemodes\a.pwn(37650) : error 001: expected token: ";", but found "]"
C:\Users\User.User-PC\Downloads\JakartaGamers-Roleplay-v1.6.0\JakartaGamers Roleplay\Aman\gamemodes\a.pwn(37650) : error 029: invalid expression, assumed zero
C:\Users\User.User-PC\Downloads\JakartaGamers-Roleplay-v1.6.0\JakartaGamers Roleplay\Aman\gamemodes\a.pwn(37650) : fatal error 107: too many error messages on one line
Reply
#4

Quote:
Originally Posted by Tihoy232
Посмотреть сообщение
C:\Users\User.User-PC\Downloads\JakartaGamers-Roleplay-v1.6.0\JakartaGamers Roleplay\Aman\gamemodes\a.pwn(37650) : error 017: undefined symbol "PlayerData"
C:\Users\User.User-PC\Downloads\JakartaGamers-Roleplay-v1.6.0\JakartaGamers Roleplay\Aman\gamemodes\a.pwn(37650) : warning 215: expression has no effect
C:\Users\User.User-PC\Downloads\JakartaGamers-Roleplay-v1.6.0\JakartaGamers Roleplay\Aman\gamemodes\a.pwn(37650) : error 001: expected token: ";", but found "]"
C:\Users\User.User-PC\Downloads\JakartaGamers-Roleplay-v1.6.0\JakartaGamers Roleplay\Aman\gamemodes\a.pwn(37650) : error 029: invalid expression, assumed zero
C:\Users\User.User-PC\Downloads\JakartaGamers-Roleplay-v1.6.0\JakartaGamers Roleplay\Aman\gamemodes\a.pwn(37650) : fatal error 107: too many error messages on one line
It means PlayerData is not defined and stop copy pasting code from another thread to your gamemode, it doesn't work like that.
Reply
#5

Continue I need to create #define MAX_PLAYERS_DATA?
Reply
#6

Quote:
Originally Posted by Tihoy232
Посмотреть сообщение
Continue I need to create #define MAX_PLAYERS_DATA?
When you don't how pawn works but you still copy/paste things
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)