Undefined Symbols -
Zerovda - 20.11.2012
I got a problem whenever I try to script a new command the following errors show up:
Код:
2968) : error 017: undefined symbol "ProxDetector"
(2975) : error 017: undefined symbol "ProxDetector"
(2982) : error 017: undefined symbol "ProxDetector"
(2991) : error 017: undefined symbol "ProxDetector"
(3005) : error 017: undefined symbol "ProxDetector"
(3012) : error 017: undefined symbol "ProxDetector"
(3016) : error 017: undefined symbol "GivePlayerCash"
(3019) : error 017: undefined symbol "ProxDetector"
(3026) : error 017: undefined symbol "ProxDetector"
(3034) : error 017: undefined symbol "GivePlayerCash"
(3037) : error 017: undefined symbol "ProxDetector"
(3044) : error 017: undefined symbol "ProxDetector"
(3051) : error 017: undefined symbol "ProxDetector"
(3065) : error 017: undefined symbol "ProxDetector"
(3074) : error 017: undefined symbol "ProxDetector"
(3086) : error 017: undefined symbol "ProxDetector"
(3105) : error 017: undefined symbol "ProxDetector"
(3119) : error 017: undefined symbol "ProxDetector"
(3133) : error 017: undefined symbol "ProxDetector"
(3141) : error 017: undefined symbol "GivePlayerCash"
(3146) : error 017: undefined symbol "ProxDetector"
(3314) : error 017: undefined symbol "GivePlayerCash"
(3572) : error 017: undefined symbol "GivePlayerCash"
(3573) : error 017: undefined symbol "GivePlayerCash"
(4874) : error 017: undefined symbol "NOPCheck"
(5484) : error 017: undefined symbol "NOPCheck"
However deleting the CMD from the GM fixes it and it compiles again without any problem, the problem occurs again when I add the CMD again..
The CMD I'm trying to add:
Код:
CMD:tolls(playerid, params[])
{
new string[128];
if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || (PlayerInfo[playerid][pMember] == 4 && PlayerInfo[playerid][pDivision] == 2) || (PlayerInfo[playerid][pMember] == 4 && PlayerInfo[playerid][pRank] >= 5) || PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
{
GetPlayerPos( playerid, Positions[0][0], Positions[0][1], Positions[0][2]);
GetDynamicObjectPos(prisontoll1, Positions[14][0], Positions[14][1], Positions[14][2]);
GetDynamicObjectPos(prisontoll2, Positions[15][0], Positions[15][1], Positions[15][2]);
if(IsPlayerInRangeOfPoint(playerid, 8.0, 940.4286,-2367.9500,13.0807)) {
if(prisontoll2Status == 0 ) {
format( string, sizeof( string ), "* %s uses their remote to open the tolls.", GetPlayerNameEx( playerid ) );
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetDynamicObjectRot(prisontoll2, 0.000000, 90.00000000,299.99267578);
prisontoll2Status = 1;
}
else {
prisontoll2Status = 0;
SetDynamicObjectRot(prisontoll2, 0.000000, 357.98950195,299.98168945);
format( string, sizeof( string ), "* %s uses their remote to close the tolls.", GetPlayerNameEx( playerid ) );
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
}
if(IsPlayerInRangeOfPoint(playerid, 8.0, 942.76953125,-2378.83496094,12.78274250)) {
if(prisontoll1Status == 0 ) {
format( string, sizeof( string ), "* %s uses their remote to open the tolls.", GetPlayerNameEx( playerid ) );
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetDynamicObjectRot(prisontoll1, 0.000000, 359.98352051,299.99267578);
prisontoll1Status = 1;
}
else {
prisontoll1Status = 0;
SetDynamicObjectRot(prisontoll1, 0.000000, 270.00000000,299.99267578);
format( string, sizeof( string ), "* %s uses their remote to close the tolls.", GetPlayerNameEx( playerid ) );
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
return 1;
}
Re: Undefined Symbols -
dr.lozer - 20.11.2012
Is there any
in .inc, FS or GM ?
Re: Undefined Symbols -
HarryPotter - 20.11.2012
You're missing a { or a }.
Re: Undefined Symbols -
Zerovda - 20.11.2012
Quote:
Originally Posted by dr.lozer
Is there any
in .inc, FS or GM ?
|
No there isn't any.
Re: Undefined Symbols -
Zerovda - 20.11.2012
Quote:
Originally Posted by HarryPotter
You're missing a { or a }.
|
I'm pretty new to scripting so if you could maybe point out where a bracket is missing?
Re: Undefined Symbols -
Red_Dragon. - 20.11.2012
I think you need a stock function for that
EDIT: 500 post
AW: Undefined Symbols -
Skimmer - 20.11.2012
GivePlayerCash and
ProxDetector aren't included in
a_samp.inc
The server does not know this function and it gives you some Erorrs.
You should create stock for
GivePlayerCash and for
ProxDetector.
GivePlayerCash is there, to protect your server from Cheaters. There is already a function is called
GivePlayerMoney. Cheaters can hack money, but they can't play with the Server variable.
I'm sure you have
pMoney variable in your enum.
pawn Код:
stock GivePlayerCash(playerid, amount)
{
if(amount >= 0) // amount is higher or is than 0
{
PlayerInfo[playerid][pMoney] += amount; // I'm not 100 per cent sure is your variable pMoney or pCash
}
else
{
PlayerInfo[playerid][pMoney] -= amount;
}
}
If you want you can use direct
GivePlayerMoney.
I hope i helped you @MouseBreaker
Re: Undefined Symbols -
Zerovda - 20.11.2012
Thanks for you in depth answer though adding that stock into my GM generates the same errors.
I already had a stock which was this one:
Код:
stock GivePlayerCash(playerid, money)
{
SetPVarInt(playerid, "Cash", GetPVarInt(playerid, "Cash")+money);
GivePlayerMoney(playerid, money);
return 1;
}
I hope we find a solution because it's very annoying I cant add any more commands.