#1

Whats wrong?

Код:
C:\Users\Dћiugas\Desktop\RRP\gamemodes\avg.pwn(700) : error 028: invalid subscript (not an array or too many subscripts): "kviestas"
C:\Users\Dћiugas\Desktop\RRP\gamemodes\avg.pwn(700) : warning 215: expression has no effect
C:\Users\Dћiugas\Desktop\RRP\gamemodes\avg.pwn(700) : error 001: expected token: ";", but found "]"
C:\Users\Dћiugas\Desktop\RRP\gamemodes\avg.pwn(700) : error 029: invalid expression, assumed zero
C:\Users\Dћiugas\Desktop\RRP\gamemodes\avg.pwn(700) : fatal error 107: too many error messages on one line
Код:
CMD:kviesti(playerid, params[])
{
	new id;
	if(id == INVALID_PLAYER_ID) {SendClientMessage(playerid, GREEN, "Player not exist"); return 0;}
	kviestas[id][GetPlayerVirtualWorld(playerid)]=true;
	new kvietimas[24],name[MAX_PLAYER_NAME];
	GetPlayerName(playerid,name,MAX_PLAYER_NAME);
	format(kvietimas,sizeof(kvietimas),"%s invited you to house",name);
	SendClientMessage(id,TEXTCOL_BLUE,kvietimas);
	GetPlayerName(id,name,MAX_PLAYER_NAME);
	format(kvietimas,sizeof(kvietimas),"You invited %s if you want to cancel : noinvite %s",name,name);
	SendClientMessage(playerid,TEXTCOL_BLUE,kvietimas);
	return 1;
}
Reply
#2

What line is the errors on?
Reply
#3

Код:
kviestas[id][GetPlayerVirtualWorld(playerid)]=true;
Reply
#4

On the top of your script (under the includes):
pawn Код:
new kviestas[MAX_PLAYERS][1064]; // Change the 1064 to whatever you want if you are using more than 1064 virtual worlds.
Under OnPlayerConnect:
pawn Код:
kviestas[playerid][GetPlayerVirtualWorld(playerid)] = false;
Under OnPlayerDisconnect:
pawn Код:
kviestas[playerid][GetPlayerVirtualWorld(playerid)] = false;
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)