/Housesell

Započeo Free Man, Jun 12, 2013, 11:05:12 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: CF
Detaljan opis problema: Errori
Dio skripte:

if(strcmp(cmd, "/housesell", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pPhousekey] == 0)
    {
SendClientMessage(playerid, COLOR_RED, "   Neposjedujes Kuću");
return 1;
    }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /housesell [PlayerID/PartOfName] [price]");
return 1;
}
new money;
giveplayerid = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /housesell [PlayerID/PartOfName] [price]");
return 1;
}
money = strvalEx(tmp);
if(money < 1) { SendClientMessage(playerid, COLOR_GREY, "   Cjena nemoze biti manja od  $1!"); return 1; }
if(IsPlayerConnected(giveplayerid))
{
    if(giveplayerid != INVALID_PLAYER_ID)
    {
        if(PlayerInfo[giveplayerid][pPhousekey] > 0)
    {
SendClientMessage(playerid, COLOR_GREY, "   Taj igrac vec ima svoju kucu.");
return 1;
    }
        if(ProxDetectorS(8.0, playerid, giveplayerid))
{
    if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "   Nemozes sam sebi prodati svoju kucu. !"); return 1; }
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "* Ponudio si svoju kucu na prodaju %s za $%d.", giveplayer, money);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s vam je ponudio da kupite njegovu kucu za $%d, (type /accept house) to accept.", sendername, money);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
HouseID[giveplayerid] = PlayerInfo[playerid][pPhousekey];
HouseOffer[giveplayerid] = playerid;
HousePrice[giveplayerid] = money;
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "   Taj igrac nije blizu vas !");
}
}
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "   Taj igrac nije online! !");
}
}
return 1;
}


Neke slike/video za lakse dobivanje pomoci(neobavezno):

C:\Users\Fenom\Desktop\California Roleplay V3.2\gamemodes\betaGFF.pwn(53782) : error 017: undefined symbol "HouseID"
C:\Users\Fenom\Desktop\California Roleplay V3.2\gamemodes\betaGFF.pwn(53782) : warning 215: expression has no effect
C:\Users\Fenom\Desktop\California Roleplay V3.2\gamemodes\betaGFF.pwn(53782) : error 001: expected token: ";", but found "]"
C:\Users\Fenom\Desktop\California Roleplay V3.2\gamemodes\betaGFF.pwn(53782) : error 029: invalid expression, assumed zero
C:\Users\Fenom\Desktop\California Roleplay V3.2\gamemodes\betaGFF.pwn(53782) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.


Moze pomoc?

moras definirat HouseID
Other Dimension RolePlay | Uskoro
Ukoliko zelite pomoci u razvoju servera, mozete se meni javit na PP/PM!


Citat: Free Man poslato Jun 12, 2013, 13:26:50 POSLE PODNE
Citat: Crazyn3ss poslato Jun 12, 2013, 13:22:20 POSLE PODNE
moras definirat HouseID

kako mozes pomoc?

nezz kako sta mora radit ta funkcija.. probaj

new HouseID[MAX_PLAYERS];
Other Dimension RolePlay | Uskoro
Ukoliko zelite pomoci u razvoju servera, mozete se meni javit na PP/PM!

Ovako if(strcmp(cmd, "/housesell", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pPhousekey] == 0)
    {
SendClientMessage(playerid, COLOR_RED, "   Neposjedujes Kuću");
return 1;
    }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /housesell [PlayerID/PartOfName] [price]");
return 1;
}
new money;
giveplayerid = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /housesell [PlayerID/PartOfName] [price]");
return 1;
}
money = strvalEx(tmp);
if(money < 1) { SendClientMessage(playerid, COLOR_GREY, "   Cjena nemoze biti manja od  $1!"); return 1; }
if(IsPlayerConnected(giveplayerid))
{
    if(giveplayerid != INVALID_PLAYER_ID)
    {
        if(PlayerInfo[giveplayerid][pPhousekey] > 0)
    {
SendClientMessage(playerid, COLOR_GREY, "   Taj igrac vec ima svoju kucu.");
return 1;
    }
        if(ProxDetectorS(8.0, playerid, giveplayerid))
{
    if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "   Nemozes sam sebi prodati svoju kucu. !"); return 1; }
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "* Ponudio si svoju kucu na prodaju %s za $%d.", giveplayer, money);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s vam je ponudio da kupite njegovu kucu za $%d, (type /accept house) to accept.", sendername, money);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
                                                new HouseID[MAX_PLAYERS];
HouseID[giveplayerid] = PlayerInfo[playerid][pPhousekey];
HouseOffer[giveplayerid] = playerid;
HousePrice[giveplayerid] = money;
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "   Taj igrac nije blizu vas !");
}
}
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "   Taj igrac nije online! !");
}
}
return 1;
}

Citat: [LX] BocaBajrovic (Bocilinjo!) poslato Jun 12, 2013, 16:04:21 POSLE PODNE
Ovako if(strcmp(cmd, "/housesell", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pPhousekey] == 0)
    {
SendClientMessage(playerid, COLOR_RED, "   Neposjedujes Kuću");
return 1;
    }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /housesell [PlayerID/PartOfName] [price]");
return 1;
}
new money;
giveplayerid = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /housesell [PlayerID/PartOfName] [price]");
return 1;
}
money = strvalEx(tmp);
if(money < 1) { SendClientMessage(playerid, COLOR_GREY, "   Cjena nemoze biti manja od  $1!"); return 1; }
if(IsPlayerConnected(giveplayerid))
{
    if(giveplayerid != INVALID_PLAYER_ID)
    {
        if(PlayerInfo[giveplayerid][pPhousekey] > 0)
    {
SendClientMessage(playerid, COLOR_GREY, "   Taj igrac vec ima svoju kucu.");
return 1;
    }
        if(ProxDetectorS(8.0, playerid, giveplayerid))
{
    if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "   Nemozes sam sebi prodati svoju kucu. !"); return 1; }
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "* Ponudio si svoju kucu na prodaju %s za $%d.", giveplayer, money);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s vam je ponudio da kupite njegovu kucu za $%d, (type /accept house) to accept.", sendername, money);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
                                                new HouseID[MAX_PLAYERS];
HouseID[giveplayerid] = PlayerInfo[playerid][pPhousekey];
HouseOffer[giveplayerid] = playerid;
HousePrice[giveplayerid] = money;
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "   Taj igrac nije blizu vas !");
}
}
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "   Taj igrac nije online! !");
}
}
return 1;
}

ako znak nije definisan, sta ti tu mozes ispraviti ? daj molim te