Jump to content
  • 0

Textdraw help


Nurdock

Question

Problema intalnita (descriere): Am facut un textdraw in care sa arate adminilor numarul de reporturi
Ero(area / rile) / warning-(ul / urile):

C:\Users\admin\Desktop\Gamer RPG\gamemodes\gamemode.pwn(4328) : warning 213: tag mismatch
C:\Users\admin\Desktop\Gamer RPG\gamemodes\gamemode.pwn(10236) : warning 219: local variable "report" shadows a variable at a preceding level
C:\Users\admin\Desktop\Gamer RPG\gamemodes\gamemode.pwn(21230) : error 001: expected token: ";", but found ":"
C:\Users\admin\Desktop\Gamer RPG\gamemodes\gamemode.pwn(21230) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
 


Liniile de cod / sursa / script-ul(obligatoriu): 

CMD:or(playerid, params[])
{
    new giveplayerid, splayer[25];
    if(gLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_ERROR, "You are not logged in.");
    if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_ERROR, "Your admin level is not high enough to use this command.");
    if(sscanf(params,"s[25]", splayer)) return SendClientMessage(playerid, COLOR_SYN, "Synthax:{FFFFFF} /or <Player ID/Name>");
    {
        if(GetPlayers(splayer) == INVALID_PLAYER_ID) return InvalidPlayer(playerid);
        else if(GetPlayers(splayer) == 1000) return ToManyResults(playerid);
        else if(GetPlayers(splayer) == 1001) return ShowResults(playerid, splayer);
        else giveplayerid = GetPlayers(splayer);
        if(ReportChat[playerid] != -1) return SendClientMessage(playerid, COLOR_ERROR, "You have an active conversation.");
        if(!HaveReport(giveplayerid)) return SendClientMessage(playerid, COLOR_ERROR, "This player does not have an active report.");
        format(gString, sizeof(gString), "%s %s opened your report. Use /rc to chat with him.", GetStaffN(playerid, 1), GetName(playerid));
  21230      NumarReports--:
        SendClientMessage(giveplayerid, COLOR_YELLOW, gString);
        format(gString, sizeof(gString), "You opened %s's report. Use /rc to chat with him.", GetName(giveplayerid));
        SendClientMessage(playerid, COLOR_YELLOW, gString);
        format(gString, sizeof(gString), "Report reason: %s", ReportInfo[ReportID(giveplayerid)][rReason]);
        SendClientMessage(playerid, COLOR_YELLOW, gString);
        format(gString, sizeof(gString), "%s opened %s's report.", GetName(playerid), GetName(giveplayerid));
        if(PlayerInfo[playerid][pAdmin]) CMDRaport(gString, 1, 0);
        else CMDRaport(gString, 0, 1);
        ReportChat[playerid] = giveplayerid;
        ReportChat[giveplayerid] = playerid;
        DeleteReport(giveplayerid);
    }
    return 1;
}

Imagini / Video (optional):
Ati incercat sa rezolvati singur?: da dar nu mi-a reusit

ma ajutati? va rog

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0
3 hours ago, KenZ0R12341 said:

Problema intalnita (descriere): Am facut un textdraw in care sa arate adminilor numarul de reporturi
Ero(area / rile) / warning-(ul / urile):

C:\Users\admin\Desktop\Gamer RPG\gamemodes\gamemode.pwn(4328) : warning 213: tag mismatch
C:\Users\admin\Desktop\Gamer RPG\gamemodes\gamemode.pwn(10236) : warning 219: local variable "report" shadows a variable at a preceding level
C:\Users\admin\Desktop\Gamer RPG\gamemodes\gamemode.pwn(21230) : error 001: expected token: ";", but found ":"
C:\Users\admin\Desktop\Gamer RPG\gamemodes\gamemode.pwn(21230) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
 


Liniile de cod / sursa / script-ul(obligatoriu): 

CMD:or(playerid, params[])
{
    new giveplayerid, splayer[25];
    if(gLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_ERROR, "You are not logged in.");
    if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_ERROR, "Your admin level is not high enough to use this command.");
    if(sscanf(params,"s[25]", splayer)) return SendClientMessage(playerid, COLOR_SYN, "Synthax:{FFFFFF} /or <Player ID/Name>");
    {
        if(GetPlayers(splayer) == INVALID_PLAYER_ID) return InvalidPlayer(playerid);
        else if(GetPlayers(splayer) == 1000) return ToManyResults(playerid);
        else if(GetPlayers(splayer) == 1001) return ShowResults(playerid, splayer);
        else giveplayerid = GetPlayers(splayer);
        if(ReportChat[playerid] != -1) return SendClientMessage(playerid, COLOR_ERROR, "You have an active conversation.");
        if(!HaveReport(giveplayerid)) return SendClientMessage(playerid, COLOR_ERROR, "This player does not have an active report.");
        format(gString, sizeof(gString), "%s %s opened your report. Use /rc to chat with him.", GetStaffN(playerid, 1), GetName(playerid));
  21230      NumarReports--:
        SendClientMessage(giveplayerid, COLOR_YELLOW, gString);
        format(gString, sizeof(gString), "You opened %s's report. Use /rc to chat with him.", GetName(giveplayerid));
        SendClientMessage(playerid, COLOR_YELLOW, gString);
        format(gString, sizeof(gString), "Report reason: %s", ReportInfo[ReportID(giveplayerid)][rReason]);
        SendClientMessage(playerid, COLOR_YELLOW, gString);
        format(gString, sizeof(gString), "%s opened %s's report.", GetName(playerid), GetName(giveplayerid));
        if(PlayerInfo[playerid][pAdmin]) CMDRaport(gString, 1, 0);
        else CMDRaport(gString, 0, 1);
        ReportChat[playerid] = giveplayerid;
        ReportChat[giveplayerid] = playerid;
        DeleteReport(giveplayerid);
    }
    return 1;
}

Imagini / Video (optional):
Ati incercat sa rezolvati singur?: da dar nu mi-a reusit

ma ajutati? va rog

La NumarReport-- ai pus ":" trebuie ";"

**********************************

Servicii Scripting de calitate:

*********************************

Future Project: ExpertGame

*********************************

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.