I defined something, but it wont be defined.
#1

So this is what I get:
Quote:

/includes/defines.pwn(1061) : error 010: invalid function or declaration
./includes/defines.pwn(1074) : error 017: undefined symbol "RobStatus"
./includes/defines.pwn(1075) : error 017: undefined symbol "RobStatus"
./includes/defines.pwn(1076) : error 017: undefined symbol "RobStatus"
./includes/defines.pwn(1077) : error 017: undefined symbol "RobStatus"
./includes/defines.pwn(107 : error 017: undefined symbol "RobStatus"
./includes/defines.pwn(1079) : error 017: undefined symbol "RobStatus"
./includes/defines.pwn(1080) : error 017: undefined symbol "RobStatus"
./includes/defines.pwn(1081) : error 017: undefined symbol "RobStatus"
./includes/defines.pwn(1082) : error 017: undefined symbol "RobStatus"
./includes/defines.pwn(1084) : error 017: undefined symbol "bankvault2"
./includes/defines.pwn(1085) : error 017: undefined symbol "bankvault1"

But then look here,
Quote:

// Robbery
new bankvault1;
new bankvault2;
new PlantedC4OnVault[MAX_PLAYERS];
new LEOOnline;

That is bankvault1 + 2

And
Quote:

enum rsInfo
{
BeingRobbed, // 0 = Not, 1 = Bank
RobAmount, // Starts at $0
RobComplete, // Rob Completed
RobberID1, // ID of Robber 1 (Required)
RobberID2, // ID of Robber 2 (Required)
RobberID3, // ID of Robber 3 (Required)
RobberID4, // ID of Robber 4 ()
RobberID5, // ID of Robber 5 ()
BankReload, // The reload for robbing the bank; Only ONCE per TopOfHour
Setup, // Has someone began setting up the robbery? 1 = Yes
};

new RobStatus[rsInfo];

This is robstatus.

So what am I doing wrong?
Reply
#2

did u add these line above all functions??
Reply
#3

Quote:
Originally Posted by Sreyas
Посмотреть сообщение
did u add these line above all functions??
no, its added to a .pwn called, and i include it with the main pwn, and it has many enums/defines in it but only this time its not working.
Reply
#4

And if it helps, It works on a different script, and i copied it to a new one. I am sure I copied everything but is there something special that was defined before I might not have?
Reply
#5

Did you paste your defines at the top of the script, or at the bottom?
Defines should be at the top of your script, and the function which use them below it.
If you have the functions listed first, followed by the defines, then you have the problem where the compiler seems to be unable to find your defines, because it hasn't found them yet.

Putting the #include at the bottom of the script has the same effect: defines not found.

When including files:

Always put #include a_samp first and your plugin includes.
These should be followed by any declaration includes (#defines, enums, arrays and global variables).
Lastly you should include your functions.
Reply
#6

Quote:
Originally Posted by AmigaBlizzard
Посмотреть сообщение
Did you paste your defines at the top of the script, or at the bottom?
Defines should be at the top of your script, and the function which use them below it.
If you have the functions listed first, followed by the defines, then you have the problem where the compiler seems to be unable to find your defines, because it hasn't found them yet.

Putting the #include at the bottom of the script has the same effect: defines not found.

When including files:

Always put #include a_samp first and your plugin includes.
These should be followed by any declaration includes (#defines, enums, arrays and global variables).
Lastly you should include your functions.
How do I include the functions
Reply
#7

use #include<function_name>
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)