09.03.2011, 19:19
(
Last edited by Sasino97; 10/03/2011 at 11:40 AM.
)
How do I fix errors like this:
?
WHY THIS THREAD
I published this thread because I see a lot of people posting:
Cause you have only the newest client, You have to download the last includes too.
WHY THIS ERROR
This error shows when you type something that the compiler doesn't know.
The problems can be:
1. You don't have the SA-MP server includes.
2. You made some writing mistakes.
3. You haven't created that stock, public or #define.
1. To fix the 1st you have to download the includes from the sa-mp team.
Download link
2. To fix the second press on the "Replace" window and first type the mistake, and in the second box the correction.
3.1 Don't call it.
3.2 Create a function with that name.
EXAMPLES
Example 1.
If this gives you an error, it's because you are using 0.3a or 0.3b.
Example 2.
Fix with
Example 3.
To fix with:
3.1 Just don't call it
or
3.2 Add that function
Code:
C:\Users\(User Name)\Desktop\sa-mp 0.3c Server\gamemodes\(GM NAME).pwn(584) : error 017: undefined symbol "bla bla bla" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
WHY THIS THREAD
I published this thread because I see a lot of people posting:
Quote:
"Why Undefined symbol? ?" "But have sa-mp 0.3c!!" |
WHY THIS ERROR
This error shows when you type something that the compiler doesn't know.
The problems can be:
1. You don't have the SA-MP server includes.
2. You made some writing mistakes.
3. You haven't created that stock, public or #define.
1. To fix the 1st you have to download the includes from the sa-mp team.
Download link
2. To fix the second press on the "Replace" window and first type the mistake, and in the second box the correction.
3.1 Don't call it.
3.2 Create a function with that name.
EXAMPLES
Example 1.
pawn Code:
public OnPlayerConnect(playerid)
{
ShowPlayerDialog(etc...);
return 1;
}
Example 2.
pawn Code:
public OnPlayerConnect(playerid)
{
GivePlayerMonu(playerid, 500);
return 1;
}
pawn Code:
public OnPlayerConnect(playerid)
{
GivePlayerMoney(playerid, 500);
return 1;
}
pawn Code:
public OnPlayerConnect(playerid)
{
SetPlayerHealthAndArmour(playerid, 55);
return 1;
}
3.1 Just don't call it
pawn Code:
public OnPlayerConnect(playerid)
{
SetPlayerHealth(playerid, 55);
SetPlayerArmour(playerid, 55);
return 1;
}
3.2 Add that function
pawn Code:
public OnPlayerConnect(playerid)
{
SetPlayerHealthAndArmour(playerid, 55);
return 1;
}
stock SetPlayerHealthAndArmour(playerid, Float:Value)
{
SetPlayerHealth(playerid, Value);
SetPlayerArmour(playerid, Value);
return 1;
}