invalid subscripts Errors, Need Help. -
X|Dragon|X - 13.01.2015
pawn Код:
new Text:RegisterBox;
new Text:RegisterWelcome;
new Text:RegisterUnderline;
new Text:PasswordBox;
new Text:RegisterNext;
new Text:MalePreview;
new Text:FemalePreview;
new PlayerText:FemaleText[MAX_PLAYERS];
new PlayerText:MaleText[MAX_PLAYERS];
new PlayerText:Password[MAX_PLAYERS];
pawn Код:
}
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(clickedid == RegisterNext)
{
TextDrawDestroy(RegisterBox[playerid]);
TextDrawDestroy(RegisterNext[playerid]);
TextDrawDestroy(RegisterUnderline[playerid]);
TextDrawDestroy(PasswordBox[playerid]);
TextDrawDestroy(RegisterUnderline[playerid]);
TextDrawDestroy(RegisterWelcome[playerid]);
TextDrawShowForPlayer(playerid, FemaleText);
TextDrawShowForPlayer(playerid, MaleText);
TextDrawShowForPlayer(playerid, MalePreview);
TextDrawShowForPlayer(playerid, FemalePreview);
}
return 1;
}
And theses are the errors:
Код:
C:\Users\Medo\Desktop\HEP-RP\gamemodes\new.pwn(504) : error 028: invalid subscript (not an array or too many subscripts): "RegisterBox"
C:\Users\Medo\Desktop\HEP-RP\gamemodes\new.pwn(504) : warning 215: expression has no effect
C:\Users\Medo\Desktop\HEP-RP\gamemodes\new.pwn(504) : error 001: expected token: ";", but found "]"
C:\Users\Medo\Desktop\HEP-RP\gamemodes\new.pwn(504) : error 029: invalid expression, assumed zero
C:\Users\Medo\Desktop\HEP-RP\gamemodes\new.pwn(504) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Please Help.
Re: invalid subscripts Errors, Need Help. -
Sawalha - 13.01.2015
do this:
pawn Код:
new Text:RegisterBox[MAX_PLAYERS];
new Text:RegisterWelcome[MAX_PLAYERS];
new Text:RegisterUnderline[MAX_PLAYERS];
new Text:PasswordBox[MAX_PLAYERS];
new Text:RegisterNext[MAX_PLAYERS];
instead. you forgot the array
Re: invalid subscripts Errors, Need Help. -
X|Dragon|X - 13.01.2015
Код:
C:\Users\Medo\Desktop\HEP-RP\gamemodes\new.pwn(63) : error 033: array must be indexed (variable "RegisterBox")
C:\Users\Medo\Desktop\HEP-RP\gamemodes\new.pwn(64) : error 035: argument type mismatch (argument 1)
C:\Users\Medo\Desktop\HEP-RP\gamemodes\new.pwn(65) : error 035: argument type mismatch (argument 1)
C:\Users\Medo\Desktop\HEP-RP\gamemodes\new.pwn(66) : error 035: argument type mismatch (argument 1)
C:\Users\Medo\Desktop\HEP-RP\gamemodes\new.pwn(67) : error 035: argument type mismatch (argument 1)
C:\Users\Medo\Desktop\HEP-RP\gamemodes\new.pwn(68) : error 035: argument type mismatch (argument 1)
C:\Users\Medo\Desktop\HEP-RP\gamemodes\new.pwn(69) : error 035: argument type mismatch (argument 1)
C:\Users\Medo\Desktop\HEP-RP\gamemodes\new.pwn(70) : error 035: argument type mismatch (argument 1)
C:\Users\Medo\Desktop\HEP-RP\gamemodes\new.pwn(71) : error 035: argument type mismatch (argument 1)
C:\Users\Medo\Desktop\HEP-RP\gamemodes\new.pwn(72) : error 035: argument type mismatch (argument 1)
C:\Users\Medo\Desktop\HEP-RP\gamemodes\new.pwn(74) : error 033: array must be indexed (variable "RegisterWelcome")
C:\Users\Medo\Desktop\HEP-RP\gamemodes\new.pwn(75) : error 035: argument type mismatch (argument 1)
C:\Users\Medo\Desktop\HEP-RP\gamemodes\new.pwn(76) : error 035: argument type mismatch (argument 1)
C:\Users\Medo\Desktop\HEP-RP\gamemodes\new.pwn(77) : error 035: argument type mismatch (argument 1)
C:\Users\Medo\Desktop\HEP-RP\gamemodes\new.pwn(78) : error 035: argument type mismatch (argument 1)
C:\Users\Medo\Desktop\HEP-RP\gamemodes\new.pwn(79) : error 035: argument type mismatch (argument 1)
C:\Users\Medo\Desktop\HEP-RP\gamemodes\new.pwn(80) : error 035: argument type mismatch (argument 1)
C:\Users\Medo\Desktop\HEP-RP\gamemodes\new.pwn(81) : error 035: argument type mismatch (argument 1)
C:\Users\Medo\Desktop\HEP-RP\gamemodes\new.pwn(82) : error 035: argument type mismatch (argument 1)
C:\Users\Medo\Desktop\HEP-RP\gamemodes\new.pwn(84) : error 033: array must be indexed (variable "RegisterUnderline")
C:\Users\Medo\Desktop\HEP-RP\gamemodes\new.pwn(85) : error 035: argument type mismatch (argument 1)
C:\Users\Medo\Desktop\HEP-RP\gamemodes\new.pwn(86) : error 035: argument type mismatch (argument 1)
C:\Users\Medo\Desktop\HEP-RP\gamemodes\new.pwn(87) : error 035: argument type mismatch (argument 1)
C:\Users\Medo\Desktop\HEP-RP\gamemodes\new.pwn(88) : error 035: argument type mismatch (argument 1)
C:\Users\Medo\Desktop\HEP-RP\gamemodes\new.pwn(89) : error 035: argument type mismatch (argument 1)
C:\Users\Medo\Desktop\HEP-RP\gamemodes\new.pwn(90) : error 035: argument type mismatch (argument 1)
Now i get those errors.
pawn Код:
RegisterBox = TextDrawCreate(474.500000, 109.416671, "usebox");
TextDrawLetterSize(RegisterBox, 0.000000, 27.553703);
TextDrawTextSize(RegisterBox, 179.500000, 0.000000);
TextDrawAlignment(RegisterBox, 1);
TextDrawColor(RegisterBox, 0);
TextDrawUseBox(RegisterBox, true);
TextDrawBoxColor(RegisterBox, 102);
TextDrawSetShadow(RegisterBox, 0);
TextDrawSetOutline(RegisterBox, 0);
TextDrawFont(RegisterBox, 0);
RegisterWelcome = TextDrawCreate(195.500000, 118.999992, "Welcome To New System Gaming");
TextDrawLetterSize(RegisterWelcome, 0.342500, 1.366666);
TextDrawAlignment(RegisterWelcome, 1);
TextDrawColor(RegisterWelcome, -1);
TextDrawSetShadow(RegisterWelcome, 0);
TextDrawSetOutline(RegisterWelcome, 1);
TextDrawBackgroundColor(RegisterWelcome, 51);
TextDrawFont(RegisterWelcome, 1);
TextDrawSetProportional(RegisterWelcome, 1);
RegisterUnderline = TextDrawCreate(228.500000, 128.916625, "- - - - - - - - - - - - - - -");
TextDrawLetterSize(RegisterUnderline, 0.449999, 1.600000);
TextDrawAlignment(RegisterUnderline, 1);
TextDrawColor(RegisterUnderline, -16776961);
TextDrawSetShadow(RegisterUnderline, 0);
TextDrawSetOutline(RegisterUnderline, 1);
TextDrawBackgroundColor(RegisterUnderline, 184548097);
TextDrawFont(RegisterUnderline, 1);
TextDrawSetProportional(RegisterUnderline, 1);
Re: invalid subscripts Errors, Need Help. -
JonathanFeitosa - 13.01.2015
Remove [playerid] the lines TextDrawDestroy.
Re: invalid subscripts Errors, Need Help. -
X|Dragon|X - 13.01.2015
But then it will destroy textdraw for all players not that specific playerid
Re: invalid subscripts Errors, Need Help. -
JonathanFeitosa - 13.01.2015
Then, use array.