SA-MP Forums Archive
Problem here. - 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: Problem here. (/showthread.php?tid=336182)



Problem here. - N0FeaR - 21.04.2012

Error i get
Код:
C:\Users\Robins\Desktop\New folder\gamemodes\IBP.pwn(700) : error 017: undefined symbol "CHECKPOINT_STORE"
C:\Users\Robins\Desktop\New folder\gamemodes\IBP.pwn(723) : error 054: unmatched closing brace ("}")
C:\Users\Robins\Desktop\New folder\gamemodes\IBP.pwn(723) : error 010: invalid function or declaration
pawn Код:
new CheckpointAreaType[23][1] = {
{CHECKPOINT_GUN},
{CHECKPOINT_STORE},
{CHECKPOINT_BANK},
{CHECKPOINT_BAR},
{CHECKPOINT_REST},
{CHECKPOINT_DMV},
{CHECKPOINT_LSPD},
{CHECKPOINT_STORE},
{CHECKPOINT_STORE},
{CHECKPOINT_STORE},
{CHECKPOINT_STORE},
{CHECKPOINT_STORE},
{CHECKPOINT_BAR},
{CHECKPOINT_BAR},
{CHECKPOINT_BAR},
{CHECKPOINT_BAR},
{CHECKPOINT_GUN},
{CHECKPOINT_CLUCK},
{CHECKPOINT_PIZZA},
{CHECKPOINT_BURGER},
{CHECKPOINT_CLOTHES},
{CHECKPOINT_CLOTHES},
{CHECKPOINT_CLOTHES}

};



Re: Problem here. - Ainseri - 21.04.2012

The errors are pretty self-explanatory. You need to #define CHECKPOINT_STORE at the top of the script or wherever. You've probably forgotten to do that. Secondly, you have a closing bracket that isn't paired with an opening bracket. Thirdly, you've probably typed a function wrong. It'd be more helpful if we knew which lines in the script the code you posted was at.


Re: Problem here. - Avi57 - 21.04.2012

show the whole script please !!


Re: Problem here. - sniperwars - 21.04.2012

pawn Код:
#define CHECKPOINT_GUN
#define CHECKPOINT_STORE
#define CHECKPOINT_BANK
#define CHECKPOINT_BAR
#define CHECKPOINT_REST
#define CHECKPOINT_DMV
#define CHECKPOINT_LSPD
#define CHECKPOINT_STORE
#define CHECKPOINT_STORE
#define CHECKPOINT_STORE
#define CHECKPOINT_STORE
#define CHECKPOINT_STORE
#define CHECKPOINT_BAR
#define CHECKPOINT_BAR
#define CHECKPOINT_BAR
#define CHECKPOINT_BAR
#define CHECKPOINT_GUN
#define CHECKPOINT_CLUCK
#define CHECKPOINT_PIZZA
#define CHECKPOINT_BURGER
#define CHECKPOINT_CLOTHES
#define CHECKPOINT_CLOTHES
#define CHECKPOINT_CLOTHES
pawn Код:
new CheckpointAreaType[23][1] = {
"CHECKPOINT_GUN",
"CHECKPOINT_STORE",
"CHECKPOINT_BANK",
"CHECKPOINT_BAR",
"CHECKPOINT_REST",
"CHECKPOINT_DMV",
"CHECKPOINT_LSPD",
"CHECKPOINT_STORE",
"CHECKPOINT_STORE",
"CHECKPOINT_STORE",
"CHECKPOINT_STORE",
"CHECKPOINT_STORE",
"CHECKPOINT_BAR",
"CHECKPOINT_BAR",
"CHECKPOINT_BAR",
"CHECKPOINT_BAR",
"CHECKPOINT_GUN",
"CHECKPOINT_CLUCK",
"CHECKPOINT_PIZZA",
"CHECKPOINT_BURGER",
"CHECKPOINT_CLOTHES",
"CHECKPOINT_CLOTHES",
"CHECKPOINT_CLOTHES"
};
I think it's something like this. Not sure.


Re: Problem here. - Ainseri - 21.04.2012

Quote:
Originally Posted by sniperwars
Посмотреть сообщение
pawn Код:
#define CHECKPOINT_GUN
#define CHECKPOINT_STORE
#define CHECKPOINT_BANK
#define CHECKPOINT_BAR
#define CHECKPOINT_REST
#define CHECKPOINT_DMV
#define CHECKPOINT_LSPD
#define CHECKPOINT_STORE
#define CHECKPOINT_STORE
#define CHECKPOINT_STORE
#define CHECKPOINT_STORE
#define CHECKPOINT_STORE
#define CHECKPOINT_BAR
#define CHECKPOINT_BAR
#define CHECKPOINT_BAR
#define CHECKPOINT_BAR
#define CHECKPOINT_GUN
#define CHECKPOINT_CLUCK
#define CHECKPOINT_PIZZA
#define CHECKPOINT_BURGER
#define CHECKPOINT_CLOTHES
#define CHECKPOINT_CLOTHES
#define CHECKPOINT_CLOTHES
I think it's something like this. Not sure.
Well, that would be pretty stupid because you're not defining them a value.


Re: Problem here. - N0FeaR - 21.04.2012

Quote:
Originally Posted by sniperwars
Посмотреть сообщение
pawn Код:
#define CHECKPOINT_GUN
#define CHECKPOINT_STORE
#define CHECKPOINT_BANK
#define CHECKPOINT_BAR
#define CHECKPOINT_REST
#define CHECKPOINT_DMV
#define CHECKPOINT_LSPD
#define CHECKPOINT_STORE
#define CHECKPOINT_STORE
#define CHECKPOINT_STORE
#define CHECKPOINT_STORE
#define CHECKPOINT_STORE
#define CHECKPOINT_BAR
#define CHECKPOINT_BAR
#define CHECKPOINT_BAR
#define CHECKPOINT_BAR
#define CHECKPOINT_GUN
#define CHECKPOINT_CLUCK
#define CHECKPOINT_PIZZA
#define CHECKPOINT_BURGER
#define CHECKPOINT_CLOTHES
#define CHECKPOINT_CLOTHES
#define CHECKPOINT_CLOTHES
pawn Код:
new CheckpointAreaType[23][1] = {
"CHECKPOINT_GUN",
"CHECKPOINT_STORE",
"CHECKPOINT_BANK",
"CHECKPOINT_BAR",
"CHECKPOINT_REST",
"CHECKPOINT_DMV",
"CHECKPOINT_LSPD",
"CHECKPOINT_STORE",
"CHECKPOINT_STORE",
"CHECKPOINT_STORE",
"CHECKPOINT_STORE",
"CHECKPOINT_STORE",
"CHECKPOINT_BAR",
"CHECKPOINT_BAR",
"CHECKPOINT_BAR",
"CHECKPOINT_BAR",
"CHECKPOINT_GUN",
"CHECKPOINT_CLUCK",
"CHECKPOINT_PIZZA",
"CHECKPOINT_BURGER",
"CHECKPOINT_CLOTHES",
"CHECKPOINT_CLOTHES",
"CHECKPOINT_CLOTHES"
};
I think it's something like this. Not sure.
i still get this

Код:
C:\Users\Robins\Desktop\New folder\gamemodes\IBP.pwn(725) : error 017: undefined symbol "CHECKPOINT_STORE"
C:\Users\Robins\Desktop\New folder\gamemodes\IBP.pwn(747) : error 010: invalid function or declaration



Re: Problem here. - ViniBorn - 21.04.2012

How will you use this?


Re: Problem here. - N0FeaR - 21.04.2012

Here is the call back for checkpoint. http://pastebin.com/cKJvBjK3


Re: Problem here. - ViniBorn - 21.04.2012

pawn Код:
new CheckpointAreaType[23] = {
CHECKPOINT_GUN,
CHECKPOINT_STORE,
CHECKPOINT_BANK,
CHECKPOINT_BAR,
CHECKPOINT_REST,
CHECKPOINT_DMV,
CHECKPOINT_LSPD,
CHECKPOINT_STORE,
CHECKPOINT_STORE,
CHECKPOINT_STORE,
CHECKPOINT_STORE,
CHECKPOINT_STORE,
CHECKPOINT_BAR,
CHECKPOINT_BAR,
CHECKPOINT_BAR,
CHECKPOINT_BAR,
CHECKPOINT_GUN,
CHECKPOINT_CLUCK,
CHECKPOINT_PIZZA,
CHECKPOINT_BURGER,
CHECKPOINT_CLOTHES,
CHECKPOINT_CLOTHES,
CHECKPOINT_CLOTHES
};



Re: Problem here. - N0FeaR - 21.04.2012

One more problem
Код:
C:\Users\Robins\Desktop\New folder\pawno\include\/CRP/Publics/OnPlayerEnterCheckpoint.pwn(13) : error 017: undefined symbol "CHECKPOINT_NONE"
C:\Users\Robins\Desktop\New folder\pawno\include\/CRP/Publics/OnPlayerEnterCheckpoint.pwn(15) : error 017: undefined symbol "ATMs"
code
pawn Код:
case CHECKPOINT_NONE:
        {
            for(new i = 0; i < ATMs; i++)
            {
                if(IsAtATM(playerid))
                {
                    ShowPlayerDialog(playerid, 143, DIALOG_STYLE_LIST, "Automatic Transaction Machine", "Withdraw\nBalance Enquiry", "Select", "Cancel");
                }
            }