#1

:S please help

pawn Код:
F:\Users\Daniel\Desktop\GamingClub RP\filterscripts\Oglasnik.pwn(185) : error 017: undefined symbol "BusinessInfo"
F:\Users\Daniel\Desktop\GamingClub RP\filterscripts\Oglasnik.pwn(185) : warning 215: expression has no effect
F:\Users\Daniel\Desktop\GamingClub RP\filterscripts\Oglasnik.pwn(185) : error 001: expected token: ";", but found "]"
F:\Users\Daniel\Desktop\GamingClub RP\filterscripts\Oglasnik.pwn(185) : error 029: invalid expression, assumed zero
F:\Users\Daniel\Desktop\GamingClub RP\filterscripts\Oglasnik.pwn(185) : fatal error 107: too many error messages on one line
pawn Код:
YCMD:kupioglasnik(playerid, params[])
{
    new id = IsPlayerNearBizEnt(playerid);

    if(id == -1 || id == 0) return SendClientMessage(playerid, COLOR_GREY, "Nesi do oglasnik");

    if(BusinessInfo[id][bOwned] != 0 || BusinessInfo[id][bPrice] == 0) return SendClientMessage(playerid, COLOR_GREY, "Ovoj oglasnik ne se prodava."); // THE LINE 185

    if(PlayerInfo[playerid][BizID] != 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Veke imas oglasnik.");

    if(PlayerInfo[playerid][Money] < BusinessInfo[id][bPrice]) return SendClientMessage(playerid, COLOR_LIGHTRED, "Nemas dovolno pari.");

    PlayerInfo[playerid][BizID] = id;
    PlayerInfo[playerid][Money] -= BusinessInfo[id][bPrice];
    GivePlayerMoney(playerid, -BusinessInfo[id][bPrice]);

    BusinessInfo[id][bLocked] = 0;
    BusinessInfo[id][bOwned] = 1;
    BusinessInfo[id][bOwner] = RemoveUnderScore(playerid);

    SendClientMessage(playerid, COLOR_YELLOW, "Cestitki!!Kupivte OGLASNIK!");
    return 1;
}
Reply
#2

Add
new BusinessInfo[MAX_PLAYERS];
Reply
#3

Quote:
Originally Posted by God'Z War
Посмотреть сообщение
Add
new BusinessInfo[MAX_PLAYERS];
Nope..

Do you have any enum that contains bOwned, bOwner, bLocked
If yes.. Add this:
pawn Код:
new BusinessInfo[MAX_PLAYERS][*ENUM_NAME*];
Reply
#4

I have that :@

the enum

pawn Код:
enum bInfo {
    bOwned,
    bPrice,
    bOwner[MAX_PLAYER_NAME],
    bType,
    bLocked,
    bMoney,
    Float:bEntranceX,
    Float:bEntranceY,
    Float:bEntranceZ,
    Float:bEntranceA,
    Float:bExitX,
    Float:bExitY,
    Float:bExitZ,
    Float:bExitA,
    bInt,
    bWorld,
    bInsideInt,
    bInsideWorld,
    bInsideIcon,
    bOutsideIcon,
    bName[128]
}
new BusinessInfo[200][bInfo];
Reply
#5

Can you give me the exact line of the error ?
Reply
#6

pawn Код:
if(BusinessInfo[id][bOwned] != 0 || BusinessInfo[id][bPrice] == 0) return SendClientMessage(playerid, COLOR_GREY, "This biz is not for sale.");
Reply
#7

If you try this..:
pawn Код:
if(BusinessInfo[id][bOwned] > 0 || BusinessInfo[id][bPrice] == 0) return SendClientMessage(playerid, COLOR_GREY, "This biz is not for sale.");
Reply
#8

I fix it , but this ?

pawn Код:
F:\Users\Daniel\Desktop\GamingClub RP\filterscripts\Oglasnik.pwn(181) : error 017: undefined symbol "gPlayerLoggedIn"
F:\Users\Daniel\Desktop\GamingClub RP\filterscripts\Oglasnik.pwn(181) : warning 215: expression has no effect
F:\Users\Daniel\Desktop\GamingClub RP\filterscripts\Oglasnik.pwn(181) : error 001: expected token: ";", but found "]"
F:\Users\Daniel\Desktop\GamingClub RP\filterscripts\Oglasnik.pwn(181) : error 029: invalid expression, assumed zero
F:\Users\Daniel\Desktop\GamingClub RP\filterscripts\Oglasnik.pwn(181) : fatal error 107: too many error messages on one line
Line

pawn Код:
if(gPlayerLoggedIn[playerid] == 0) return 1;
Reply
#9

Try this:
pawn Код:
if(!gPlayerLoggedIn[playerid]) return 1;
Reply
#10

Same please help
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)