Hello.
Kérdésem:
Erre a sorra:
TextDrawBackgroundColor(TextDraw1[playerid], 255);
mért kapom ezt az error \"csomagot\" ?
028: invalid subscript (not an array or too many subscripts): \"TextDraw1\"
warning 215: expression has no effect
error 001: expected token: \";\", but found \"]\"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
a textdraw elkészitése a nem a gamemodeinitben hanem connectben van :)
zsomaa
én úgytudtam nem lehet \"[playerid]\"-t berakni
de am:
new Text:TextDraw;
public OnPlayerConnect(playerid)
{
TextDrawShowForPlayer(playerid, TextDraw);
return 1;
}
public OnGameModeInit()
{
TextDraw = TextDrawCreate(0.0, 0.0, \"szöveg\");
TextDrawUseBox(TextDraw, 0);
// így a többi
return 1;
}
public OnGameModeExit()
{
TextDrawHideForAll(TextDraw);
TextDrawDestroy(TextDraw);
return 1;
}
vagy:
forward OtherTextDraw();
new Text:TextDraw;
new ShowTextDraw[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
OtherTextDraw();
return 1;
}
public OtherTextDraw()
{
if(ShowTextDraw[playerid] = 0)
{
TextDraw = TextDrawCreate(0.0, 0.0, \"szöveg\");
TextDrawUseBox(TextDraw, 0);
// így a többi
TextDrawShowForPlayer(playerid, TextDraw);
ShowTextDraw[playerid] = 1;
}
return 1;
}
public OnGameModeExit()
{
TextDrawHideForAll(TextDraw);
TextDrawDestroy(TextDraw);
return 1;
}