PDA

View Full Version : Error !!!!


TYDS
15/12/2016, 02:58 PM
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;
}

Cerealguy
15/12/2016, 03:12 PM
wtf really 99999?, 50 is much more than enough, and no need 3 string use one

fix: REP++

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;
}

TYDS
15/12/2016, 03:15 PM
wtf really 99999?, 50 is much more than enough

fix: REP++

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"

Cerealguy
15/12/2016, 03:17 PM
Check my last comment i EDIT!

saffierr
15/12/2016, 03:26 PM
CTLR + F > 'Diem' and remove the variable you created outside the CMD.