Error !!!!
#1

Код:
Thien.pwn(808) : warning 219: local variable "Diem" shadows a variable at a preceding level
Thien.pwn(810) : error 035: argument type mismatch (argument 1)
Thien.pwn(810) : error 035: argument type mismatch (argument 1)
Thien.pwn(810) : error 076: syntax error in the expression, or invalid function call
Thien.pwn(810) : fatal error 107: too many error messages on one line
Код:
forward BangDiemSoTextDraw(playerid);
public BangDiemSoTextDraw(playerid)
{
	for(new x = 0; x <= 2; x++) TextDrawShowForPlayer(playerid,BangDiemSo[x]);
	new Diem[99999], Giet[99999], Chet[99999];
	
	format(Diem,sizeof(Diem),"Diem: %i", GetPlayerScore;
	TextDrawSetString(BangDiemSo[0], Diem);
	format(Giet,sizeof(Giet),"Giet: %i", PlayerInfo[playerid][Kills]);
	TextDrawSetString(BangDiemSo[1], Giet);
	format(Chet,sizeof(Chet),"Chet: %i", PlayerInfo[playerid][Deaths]);
	TextDrawSetString(BangDiemSo[2], Chet);
	return 1;
}
Reply
#2

wtf really 99999?, 50 is much more than enough, and no need 3 string use one

fix: REP++
pawn Код:
forward BangDiemSoTextDraw(playerid);
public BangDiemSoTextDraw(playerid)
{
    for(new x = 0; x <= 2; x++) TextDrawShowForPlayer(playerid,BangDiemSo[x]);
    new str[50];
   
    format(str,sizeof(str),"Diem: %i", GetPlayerScore(playerid));
    TextDrawSetString(BangDiemSo[0], str);
    format(str,sizeof(str),"Giet: %i", PlayerInfo[playerid][Kills]);
    TextDrawSetString(BangDiemSo[1], str);
    format(str,sizeof(str),"Chet: %i", PlayerInfo[playerid][Deaths]);
    TextDrawSetString(BangDiemSo[2], str);
    return 1;
}
Reply
#3

Quote:
Originally Posted by Cerealguy
Посмотреть сообщение
wtf really 99999?, 50 is much more than enough

fix: REP++
pawn Код:
forward BangDiemSoTextDraw(playerid);
public BangDiemSoTextDraw(playerid)
{
    for(new x = 0; x <= 2; x++) TextDrawShowForPlayer(playerid,BangDiemSo[x]);
    new Diem[50], Giet[50], Chet[50];
   
    format(Diem,sizeof(Diem),"Diem: %i", GetPlayerScore(playerid));
    TextDrawSetString(BangDiemSo[0], Diem);
    format(Giet,sizeof(Giet),"Giet: %i", PlayerInfo[playerid][Kills]);
    TextDrawSetString(BangDiemSo[1], Giet);
    format(Chet,sizeof(Chet),"Chet: %i", PlayerInfo[playerid][Deaths]);
    TextDrawSetString(BangDiemSo[2], Chet);
    return 1;
}
still have error
Код:
warning 219: local variable "Diem" shadows a variable at a preceding level
Thien.pwn(813) : error 035: argument type mismatch (argument 1)
Thien.pwn(813) : error 035: argument type mismatch (argument 1)
Thien.pwn(814) : error 035: argument type mismatch (argument 2)
Thien.pwn(811) : warning 204: symbol is assigned a value that is never used: "Diem"
Reply
#4

Check my last comment i EDIT!
Reply
#5

CTLR + F > 'Diem' and remove the variable you created outside the CMD.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)