[Pomoc]Errors

Započeo Schwarz
27. Okt. 2012. Zaključano
510
pregleda
7
postova
Mikjo_Ivanovski
5
Kingpin
27. Okt. 2012.
Skripta koju koristim: iz 0
Detaljan opis problema: Daje mi 4 errore
Dio skripte:
C:\Documents and Settings\Mikjo\Desktop\SAMP Roleplay script\gamemodes\LGRP.pwn(11857) : error 001: expected token: ")", but found ";"
C:\Documents and Settings\Mikjo\Desktop\SAMP Roleplay script\gamemodes\LGRP.pwn(11857) : error 036: empty statement
C:\Documents and Settings\Mikjo\Desktop\SAMP Roleplay script\gamemodes\LGRP.pwn(11858) : warning 225: unreachable code
C:\Documents and Settings\Mikjo\Desktop\SAMP Roleplay script\gamemodes\LGRP.pwn(11858) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Mikjo\Desktop\SAMP Roleplay script\gamemodes\LGRP.pwn(11858) : warning 215: expression has no effect
C:\Documents and Settings\Mikjo\Desktop\SAMP Roleplay script\gamemodes\LGRP.pwn(11858) : error 001: expected token: ";", but found "if"

Neke slike/video za lakse dobivanje pomoci(neobavezno):
CMD:makeadmin(playerid, params[])
{
    new pID, value;
if(IsAdmin(playerid, 1); return SendClientMessage(playerid, COLOR_RED, "You're not authorized to that command!");  //Tu mi daje errore
else if (sscanf(params, "ui", pID, value)) return SendClientMessage(playerid, COLOR_GREY, "Usage: /makeadmin ");
else if (value < 0 || value > 1338) return SendClientMessage(playerid, COLOR_WHITE, "Unknown Level! Valid Levels: 1, 2, 3, 4, 1337");
else if(pID == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY,"Invalid player specified");
else
{
  new pName, tName, string;
  GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
    GetPlayerName(pID, tName, MAX_PLAYER_NAME);
    format(string, sizeof(string), ": You have promoted %s to Admin level %i", tName, value);
    SendClientMessage(playerid, COLOR_RED, string);
    format(string, sizeof(string), ": Congratulations, you have been promoted to Admin level %i by %s", value, pName);
    SendClientMessage(pID, COLOR_RED, string);
    PlayerInfo = value;
    }
    return 1;
}
[Pawno | MTA] Muhamed
4
Enforcer
27. Okt. 2012.

CMD:makeadmin(playerid, params[])
{
    new pID, value;
if(IsAdmin(playerid, 1); return SendClientMessage(playerid, COLOR_RED, "You're not authorized to that command!");  //Tu mi daje errore
else if (sscanf(params, "ui", pID, value)) return SendClientMessage(playerid, COLOR_GREY, "Usage: /makeadmin ");
else if (value < 0 || value > 1338) return SendClientMessage(playerid, COLOR_WHITE, "Unknown Level! Valid Levels: 1, 2, 3, 4, 1337");
else if(pID == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY,"Invalid player specified");
new pName, tName, string;
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
GetPlayerName(pID, tName, MAX_PLAYER_NAME);
format(string, sizeof(string), ": You have promoted %s to Admin level %i", tName, value);
SendClientMessage(playerid, COLOR_RED, string);
format(string, sizeof(string), ": Congratulations, you have been promoted to Admin level %i by %s", value, pName);
SendClientMessage(pID, COLOR_RED, string);
PlayerInfo = value;
    }
    return 1;
}
Mikjo_Ivanovski
5
Kingpin
27. Okt. 2012.
Neradi sad mi daje 5 errore
[Pawno | MTA] Muhamed
4
Enforcer
27. Okt. 2012.
Moja greška...

Kod:
CMD:makeadmin(playerid, params[])
{
    new pID, value;
if(IsAdmin(playerid, 1) return SendClientMessage(playerid, COLOR_RED, "You're not authorized to that command!");  //Tu mi daje errore
else if (sscanf(params, "ui", pID, value)) return SendClientMessage(playerid, COLOR_GREY, "Usage: /makeadmin ");
else if (value < 0 || value > 1338) return SendClientMessage(playerid, COLOR_WHITE, "Unknown Level! Valid Levels: 1, 2, 3, 4, 1337");
else if(pID == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY,"Invalid player specified");
new pName, tName, string;
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
GetPlayerName(pID, tName, MAX_PLAYER_NAME);
format(string, sizeof(string), ": You have promoted %s to Admin level %i", tName, value);
SendClientMessage(playerid, COLOR_RED, string);
format(string, sizeof(string), ": Congratulations, you have been promoted to Admin level %i by %s", value, pName);
SendClientMessage(pID, COLOR_RED, string);
PlayerInfo = value;
    }
    return 1;
}
Mikjo_Ivanovski
5
Kingpin
27. Okt. 2012.
C:\Documents and Settings\Mikjo\Desktop\SAMP Roleplay script\gamemodes\LGRP.pwn(11856) : error 001: expected token: ")", but found "return"
C:\Documents and Settings\Mikjo\Desktop\SAMP Roleplay script\gamemodes\LGRP.pwn(11868) : warning 209: function "cmd_makeadmin" should return a value
C:\Documents and Settings\Mikjo\Desktop\SAMP Roleplay script\gamemodes\LGRP.pwn(11869) : error 010: invalid function or declaration

Sad ovo daje  😁
[Pawno | MTA] Muhamed
4
Enforcer
27. Okt. 2012.
Kpiraj sve

CMD:makeadmin(playerid, params[])
{
    new pID, value;
if(IsAdmin(playerid, 1)) return SendClientMessage(playerid, COLOR_RED, "You're not authorized to that command!");  //Tu mi daje errore
else if (sscanf(params, "ui", pID, value)) return SendClientMessage(playerid, COLOR_GREY, "Usage: /makeadmin ");
else if (value < 0 || value > 1338) return SendClientMessage(playerid, COLOR_WHITE, "Unknown Level! Valid Levels: 1, 2, 3, 4, 1337");
else if(pID == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY,"Invalid player specified");
new pName, tName, string;
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
GetPlayerName(pID, tName, MAX_PLAYER_NAME);
format(string, sizeof(string), ": You have promoted %s to Admin level %i", tName, value);
SendClientMessage(playerid, COLOR_RED, string);
format(string, sizeof(string), ": Congratulations, you have been promoted to Admin level %i by %s", value, pName);
SendClientMessage(pID, COLOR_RED, string);
PlayerInfo = value;
        return 1;
}
Mikjo_Ivanovski
5
Kingpin
27. Okt. 2012.
Sad je OK hvala radi  😁

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha