Error -
Junx - 11.02.2013
Hi, i keep getting an error in my line. It doesnt make sence since i made it exactly like all the others..
playerstats[playerid] = CreatePlayerTextDraw(playerid, 240.0,580.0, "hallo");
And in that 1 line it gives me 4 errors witch are:
(6207) : error 028: invalid subscript (not an array or too many subscripts): "playerstats"
(6207) : warning 215: expression has no effect
(6207) : error 001: expected token: ";", but found "]"
(6207) : error 029: invalid expression, assumed zero
(6207) : fatal error 107: too many error messages on one line
i included these things :
forward playerstats(playerid);
public playerstats(playerid)
{
TextDrawForPlayer(playerid, ShowStats);
}
Re: Error -
DiGiTaL_AnGeL - 11.02.2013
Have you created the variable "playerstats"?
pawn Код:
new playerstats[playerid];
Re: Error -
Junx - 11.02.2013
Yea these are the comple lines i made
pawn Код:
forward playerstats(playerid);
new PlayerText:playerstats[playerid];
public playerstats(playerid)
{
playerstats[playerid] = CreatePlayerTextDraw(playerid, 240.0,580.0, " ");
TextDrawAlignment(playerstats[playerid], 2);
TextDrwaBackgroundColor(playerstats[playerid], 255);
TextDrawFont(playerstats[playerid], 1);
TextDrawSetOutline(playerstats[playerid], 1);
TextDrawSetProportional(playerstats[playerid], 1);
TextDrawLetterSize(playerstats[playerid], 0.3, 1.25);
PlayerTextDrawUseBox(playerid, playerstats[playerid], 1);
PlayerTextDrawBoxColor(playerid, playerstats[playerid],0x00000066);
PlayerTextDrawColor(playerid, playerstats[playerid], 0xFF0000FF);
TextDrawTextSize(playerstats[playerid], 160.00,280.00);
}
And i want it to show me something when i type an command
Re: Error -
DaRk_RaiN - 11.02.2013
pawn Код:
new PlayerText:playerstats[MAX_PLAYERS];
And you don't need to forward it or what ever,just put this code in OnPlayerConnect call back.
pawn Код:
playerstats[playerid] = CreatePlayerTextDraw(playerid, 240.0,580.0, " ");
TextDrawAlignment(playerstats[playerid], 2);
TextDrwaBackgroundColor(playerstats[playerid], 255);
TextDrawFont(playerstats[playerid], 1);
TextDrawSetOutline(playerstats[playerid], 1);
TextDrawSetProportional(playerstats[playerid], 1);
TextDrawLetterSize(playerstats[playerid], 0.3, 1.25);
PlayerTextDrawUseBox(playerid, playerstats[playerid], 1);
PlayerTextDrawBoxColor(playerid, playerstats[playerid],0x00000066);
PlayerTextDrawColor(playerid, playerstats[playerid], 0xFF0000FF);
TextDrawTextSize(playerstats[playerid], 160.00,280.00);
Re: Error -
Junx - 11.02.2013
hmm, i retypt it all and did some things else.
Fixed it! and also tnx!
If it works i will show you what came from it!
Re: Error -
Junx - 11.02.2013
Hmm, now it givess me a tag mismatch....
These are the lines that give the warnings.
pawn Код:
TextDrawAlignment(playerstats[playerid], 2);
TextDrawBackgroundColor(playerstats[playerid], 255);
TextDrawFont(playerstats[playerid], 1);
TextDrawSetOutline(playerstats[playerid], 1);
TextDrawSetProportional(playerstats[playerid], 1);
TextDrawLetterSize(playerstats[playerid], 0.3, 1.25);
TextDrawTextSize(playerstats[playerid], 160.00,280.00);
(6207) : warning 213: tag mismatch
(6208) : warning 213: tag mismatch
(6209) : warning 213: tag mismatch
(6210) : warning 213: tag mismatch
(6211) : warning 213: tag mismatch
(6212) : warning 213: tag mismatch
(6216) : warning 213: tag mismatch