[POMOC]Komanda neradi

Započeo MreR, Mart 17, 2013, 09:43:56 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Evo ovako,znaci radim svoj mod i napravio sam komandu  /makeleader,i kad uÄ'em na server i kucam /makeleader 0 1 pise mi da taj igrac nije online
a u modu nema errora compile sam
evo slika :




SOFTSTAR DEATHMATCH POSJETITE NAS : 178.238.229.126:7971

Umjesto svoje funkcije:

else if (id == INVALID_PLAYER_ID) itd..


Stavi ovako:

if (id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_WHITE, "Taj igrac nije na serveru");
BIG RESPEKT: Blaeks,  [CRP] Joey_, David (Sabljak) A.k.A SABO(T), joXy_, Dimi, Sexserghy ♥, TerminuS, H1TM4N

sad mi daje ove errore

C:\Documents and Settings\MarioiMarkoGabi\Desktop\SoftStar\SoftStar RP\gamemodes\softstar.pwn(17808) : error 017: undefined symbol "id"
C:\Documents and Settings\MarioiMarkoGabi\Desktop\SoftStar\SoftStar RP\gamemodes\softstar.pwn(18252 -- 18253) : warning 215: expression has no effect
C:\Documents and Settings\MarioiMarkoGabi\Desktop\SoftStar\SoftStar RP\gamemodes\softstar.pwn(18253) : error 001: expected token: ";", but found "else"
C:\Documents and Settings\MarioiMarkoGabi\Desktop\SoftStar\SoftStar RP\gamemodes\softstar.pwn(18253) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.


kak da to popravim

SOFTSTAR DEATHMATCH POSJETITE NAS : 178.238.229.126:7971

Citat: MreR poslato Mart 17, 2013, 09:53:08 PRE PODNE
sad mi daje ove errore

C:\Documents and Settings\MarioiMarkoGabi\Desktop\SoftStar\SoftStar RP\gamemodes\softstar.pwn(17808) : error 017: undefined symbol "id"
C:\Documents and Settings\MarioiMarkoGabi\Desktop\SoftStar\SoftStar RP\gamemodes\softstar.pwn(18252 -- 18253) : warning 215: expression has no effect
C:\Documents and Settings\MarioiMarkoGabi\Desktop\SoftStar\SoftStar RP\gamemodes\softstar.pwn(18253) : error 001: expected token: ";", but found "else"
C:\Documents and Settings\MarioiMarkoGabi\Desktop\SoftStar\SoftStar RP\gamemodes\softstar.pwn(18253) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.


kak da to popravim


Dodaj gore u komandi:

new id;


Postaj ovdje cijeli kod komande da ti napravim ne da mi se prepisivati ..
Poslednja Izmena: Mart 17, 2013, 09:56:37 PRE PODNE od FlasH
BIG RESPEKT: Blaeks,  [CRP] Joey_, David (Sabljak) A.k.A SABO(T), joXy_, Dimi, Sexserghy ♥, TerminuS, H1TM4N

evo ti :

COMMAND:makeleader(playerid,params[])
{
    new
    id,
    level,
    otext[50],
    ime[MAX_PLAYER_NAME],
    ime2[MAX_PLAYER_NAME],
    string[128];
    if (id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_WHITE, "Taj igrac nije na serveru");
    else
    {
       if(level > 11 || level < 0) { SCM(playerid,COLOR_GRAD4,"[Greska]: Minimalno 0 i maximalno 11."); return 1; }
       if(PlayerInfo[playerid][pAdmin] >= 1337)
       {
            if(level == 0) { PlayerInfo[id][pChar] = 17; otext = "nista"; PlayerInfo[id][pTeam] = 0;}
         else if(level == 1) { PlayerInfo[id][pChar] = 288; otext = "LS-PD"; }
         else if(level == 2) { PlayerInfo[id][pChar] = 286; otext = "FBI";}
         else if(level == 3) { PlayerInfo[id][pChar] = 287; otext = "National Gurad";}
         else if(level == 4) { PlayerInfo[id][pChar] = 122; otext = "Salvatores"; }
         else if(level == 5) { PlayerInfo[id][pChar] = 113; otext = "Nuestra Familia"; }
         else if(level == 6) { PlayerInfo[id][pChar] = 120; otext = "Yakuza"; }
         else if(level == 7) { PlayerInfo[id][pChar] = 147; otext = "Gradonacelnik"; }
         else if(level == 8) { PlayerInfo[id][pChar] = 294; otext = "Hitman"; }
         else if(level == 9) { PlayerInfo[id][pChar] = 227; otext = "Novinar"; }
         else if(level == 10){ PlayerInfo[id][pChar] = 61;  otext = "Taxi Club"; }
         else if(level == 11){ PlayerInfo[id][pChar] = 106; otext = "Grove Street"; }
         PlayerInfo[id][pLeader] = level;
         PlayerInfo[id][pMember] = level;
         PlayerInfo[id][pRank] = 6;
         GetPlayerName(playerid, ime, sizeof(ime));
         GetPlayerName(id, ime2, sizeof(ime2));
         format(string, sizeof string,"Postavljen si da vodis %s | Od strane admina: %s",otext,ime);
         SCM(id,COLOR_Text,string);
         format(string, sizeof string,"Postavio si %s da vodi %s",ime2,otext);
         SCM(playerid,COLOR_Text,string);
         gTeam[id] = 10;
            PlayerInfo[id][pTeam] = 10;
            SetPlayerSkin(id, PlayerInfo[id][pChar]);
       }
       else
       {
          SCM(playerid,COLOR_GRAD4,"[Greska]: (Odbijeno) Nisi admin.");
       }
   }

SOFTSTAR DEATHMATCH POSJETITE NAS : 178.238.229.126:7971

Ovako stavi pa javi:

COMMAND:makeleader(playerid,params[])
{
    new id,level,otext[50],ime[MAX_PLAYER_NAME],ime2[MAX_PLAYER_NAME],string[128],lider;
    if (sscanf(params, "ui", id, lider)) return SendClientMessage(playerid, COLOR_WHITE, "Koristi: /makeleader (playerid) (org)");
    if(level > 11 || level < 0) { SCM(playerid,COLOR_GRAD4,"[Greska]: Minimalno 0 i maximalno 11."); return 1; }
    if (id == INVALID_PLAYER_ID) return SCM(playerid, COLOR_WHITE, "Taj igrac nije online");
    if(PlayerInfo[playerid][pAdmin] >= 1337) return SendClientMessage(playerid, COLOR_WHITE, "Nisi admin");
    {
        if(level == 0) { PlayerInfo[id][pChar] = 17; otext = "nista"; PlayerInfo[id][pTeam] = 0;}
        else if(level == 1) { PlayerInfo[id][pChar] = 288; otext = "LS-PD"; }
        else if(level == 2) { PlayerInfo[id][pChar] = 286; otext = "FBI";}
        else if(level == 3) { PlayerInfo[id][pChar] = 287; otext = "National Gurad";}
        else if(level == 4) { PlayerInfo[id][pChar] = 122; otext = "Salvatores"; }
        else if(level == 5) { PlayerInfo[id][pChar] = 113; otext = "Nuestra Familia"; }
        else if(level == 6) { PlayerInfo[id][pChar] = 120; otext = "Yakuza"; }
        else if(level == 7) { PlayerInfo[id][pChar] = 147; otext = "Gradonacelnik"; }
        else if(level ==  { PlayerInfo[id][pChar] = 294; otext = "Hitman"; }
        else if(level == 9) { PlayerInfo[id][pChar] = 227; otext = "Novinar"; }
        else if(level == 10){ PlayerInfo[id][pChar] = 61;  otext = "Taxi Club"; }
        else if(level == 11){ PlayerInfo[id][pChar] = 106; otext = "Grove Street"; }
        PlayerInfo[id][pLeader] = level;
        PlayerInfo[id][pMember] = level;
        PlayerInfo[id][pRank] = 6;
        GetPlayerName(playerid, ime, sizeof(ime));
        GetPlayerName(id, ime2, sizeof(ime2));
        format(string, sizeof string,"Postavljen si da vodis %s | Od strane admina: %s",otext,ime);
        SCM(id,COLOR_Text,string);
        format(string, sizeof string,"Postavio si %s da vodi %s",ime2,otext);
        SCM(playerid,COLOR_Text,string);
        gTeam[id] = 10;
        PlayerInfo[id][pTeam] = 10;
    	SetPlayerSkin(id, PlayerInfo[id][pChar]);
	}
	return 1;
}
BIG RESPEKT: Blaeks,  [CRP] Joey_, David (Sabljak) A.k.A SABO(T), joXy_, Dimi, Sexserghy ♥, TerminuS, H1TM4N

C:\Documents and Settings\MarioiMarkoGabi\Desktop\Empire-Gaming\SoftStar RP\gamemodes\softstar.pwn(17808) : error 017: undefined symbol "id"
C:\Documents and Settings\MarioiMarkoGabi\Desktop\Empire-Gaming\SoftStar RP\gamemodes\softstar.pwn(32782) : warning 211: possibly unintended assignment
C:\Documents and Settings\MarioiMarkoGabi\Desktop\Empire-Gaming\SoftStar RP\gamemodes\softstar.pwn(32782) : error 008: must be a constant expression; assumed zero
C:\Documents and Settings\MarioiMarkoGabi\Desktop\Empire-Gaming\SoftStar RP\gamemodes\softstar.pwn(32783) : error 029: invalid expression, assumed zero
C:\Documents and Settings\MarioiMarkoGabi\Desktop\Empire-Gaming\SoftStar RP\gamemodes\softstar.pwn(32783) : warning 215: expression has no effect
C:\Documents and Settings\MarioiMarkoGabi\Desktop\Empire-Gaming\SoftStar RP\gamemodes\softstar.pwn(32783) : error 001: expected token: ";", but found "if"
C:\Documents and Settings\MarioiMarkoGabi\Desktop\Empire-Gaming\SoftStar RP\gamemodes\softstar.pwn(32798) : warning 209: function "cmd_makeleader" should return a value
C:\Documents and Settings\MarioiMarkoGabi\Desktop\Empire-Gaming\SoftStar RP\gamemodes\softstar.pwn(32799) : error 010: invalid function or declaration
C:\Documents and Settings\MarioiMarkoGabi\Desktop\Empire-Gaming\SoftStar RP\gamemodes\softstar.pwn(32802) : error 010: invalid function or declaration
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase


6 Errors.

ovo mi pokazuje de ja cu tebi send mod pa ti to rjesi ><

SOFTSTAR DEATHMATCH POSJETITE NAS : 178.238.229.126:7971

Citat: MreR poslato Mart 17, 2013, 10:19:39 PRE PODNE
C:\Documents and Settings\MarioiMarkoGabi\Desktop\Empire-Gaming\SoftStar RP\gamemodes\softstar.pwn(17808) : error 017: undefined symbol "id"
C:\Documents and Settings\MarioiMarkoGabi\Desktop\Empire-Gaming\SoftStar RP\gamemodes\softstar.pwn(32782) : warning 211: possibly unintended assignment
C:\Documents and Settings\MarioiMarkoGabi\Desktop\Empire-Gaming\SoftStar RP\gamemodes\softstar.pwn(32782) : error 008: must be a constant expression; assumed zero
C:\Documents and Settings\MarioiMarkoGabi\Desktop\Empire-Gaming\SoftStar RP\gamemodes\softstar.pwn(32783) : error 029: invalid expression, assumed zero
C:\Documents and Settings\MarioiMarkoGabi\Desktop\Empire-Gaming\SoftStar RP\gamemodes\softstar.pwn(32783) : warning 215: expression has no effect
C:\Documents and Settings\MarioiMarkoGabi\Desktop\Empire-Gaming\SoftStar RP\gamemodes\softstar.pwn(32783) : error 001: expected token: ";", but found "if"
C:\Documents and Settings\MarioiMarkoGabi\Desktop\Empire-Gaming\SoftStar RP\gamemodes\softstar.pwn(32798) : warning 209: function "cmd_makeleader" should return a value
C:\Documents and Settings\MarioiMarkoGabi\Desktop\Empire-Gaming\SoftStar RP\gamemodes\softstar.pwn(32799) : error 010: invalid function or declaration
C:\Documents and Settings\MarioiMarkoGabi\Desktop\Empire-Gaming\SoftStar RP\gamemodes\softstar.pwn(32802) : error 010: invalid function or declaration
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase


6 Errors.

ovo mi pokazuje de ja cu tebi send mod pa ti to rjesi ><

Ok sada ću pogledati,mora da to nije ta linija,jer je ovdje u toj komandi ID definiran.
BIG RESPEKT: Blaeks,  [CRP] Joey_, David (Sabljak) A.k.A SABO(T), joXy_, Dimi, Sexserghy ♥, TerminuS, H1TM4N

moze lock,pomogo mi je flash

SOFTSTAR DEATHMATCH POSJETITE NAS : 178.238.229.126:7971

Rijesen problem, lock.

Last nick: Paradox