Error - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Error (
/showthread.php?tid=376810)
Error -
Vizi - 11.09.2012
: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;
}
Re: Error -
God'Z War - 11.09.2012
Add
new BusinessInfo[MAX_PLAYERS];
Re: Error -
Roach_ - 11.09.2012
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*];
Re: Error -
Vizi - 11.09.2012
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];
Re: Error -
Roach_ - 11.09.2012
Can you give me the exact line of the error ?
Re: Error -
Vizi - 11.09.2012
pawn Код:
if(BusinessInfo[id][bOwned] != 0 || BusinessInfo[id][bPrice] == 0) return SendClientMessage(playerid, COLOR_GREY, "This biz is not for sale.");
Re: Error -
Roach_ - 11.09.2012
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.");
Re: Error -
Vizi - 11.09.2012
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;
Re: Error -
Roach_ - 11.09.2012
Try this:
pawn Код:
if(!gPlayerLoggedIn[playerid]) return 1;
Re: Error -
Vizi - 11.09.2012
Same
please help