error 017: undefined symbol "bf1" -
Omar55555 - 10.02.2014
well guys i'm sorry im requesting alot of scripting helps recently but who doesn't make mistakes.
my error is
Код:
E:\GAMES\Omar\SA-MP Tools & Servers\SA-MP Servers\being\filterscripts\Untitledtesting.pwn(208) : error 017: undefined symbol "bf1"
E:\GAMES\Omar\SA-MP Tools & Servers\SA-MP Servers\being\filterscripts\Untitledtesting.pwn(218) : warning 217: loose indentation
E:\GAMES\Omar\SA-MP Tools & Servers\SA-MP Servers\being\filterscripts\Untitledtesting.pwn(218) : error 017: undefined symbol "bf12"
line 208
pawn Код:
if(pickupid == bf1 || pickupid == bf2 ||
line 218
pawn Код:
if(pickupid == bf12) return SetPlayerAttachedObject(playerid, 1, 1210, 1, Float:42, Float:913, Float:0, Float:0, Float:0, Float:0, Float:52, Float:0, Float:0, 0, 0);
it says undefined symbol "bf12" and "bf1" and yes i did
and when i do
nothing happens aswell. please i need help
thanks in advance
Re: error 017: undefined symbol "bf1" -
park4bmx - 10.02.2014
its
not a define!
Also make sure they are public and outside of any callback or if you only need them in the callback then above the first usage of the pickup
Re: error 017: undefined symbol "bf1" -
Omar55555 - 10.02.2014
i'm doing
pawn Код:
new bf1;
new bf2;
new bf3;
new bf4;
new bf5;
new bf6;
new bf7;
new bf8;
new bf9;
new bf10;
new bf11;
new bf12;
new bf13;
new bf14;
new bf15;
new bf16;
new bf17;
new bf18;
new bf19;
on top if the
PHP код:
public OnFilterScriptInit()
and i couldn't understand what your saying please sir help me.
Re: error 017: undefined symbol "bf1" -
ACI - 10.02.2014
If you haven't defined them globally then you're doing it wrong. I was reading your problem and I saw the conditional check you posted:
pawn Код:
if(pickupid == bf1 || pickupid == bf2 ||
Which must be:
pawn Код:
if((pickupid == bf1) || (pickupid == bf2))
I also saw another thing you posted:
pawn Код:
if(pickupid == bf12) return SetPlayerAttachedObject(playerid, 1, 1210, 1, Float:42, Float:913, Float:0, Float:0, Float:0, Float:0, Float:52, Float:0, Float:0, 0, 0);
I am not really sure why you are adding the "Float:" with numbers. Are you making a library? Anyway if you aren't then you should be doing this:
pawn Код:
SetPlayerAttachedObject(playerid, 1, 1210, 1, 42, 913, 0, 0, 0, 0, 52, 0, 0, 0, 0);
Re: error 017: undefined symbol "bf1" -
Omar55555 - 10.02.2014
no ACI it didn't work it gave me another errors
here is all my OnPlayerPickupPickup(playerid, pickupid)
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == bf1 || pickupid == bf2 ||
pickupid == bf3 || pickupid == bf4 ||
pickupid == bf5 || pickupid == bf6 ||
pickupid == bf7 || pickupid == bf8 ||
pickupid == bf9 || pickupid == bf10||
pickupid == bf11 || pickupid == bf13 ||
pickupid == bf14 || pickupid == bf15 ||
pickupid == bf16 || pickupid == bf17 ||
pickupid == bf18 || pickupid == bf19) return SetPlayerAttachedObject(playerid, 1, 1210, 1, Float:0, Float:450, Float:0, Float:0, Float:0, Float:0, Float:0, Float:0, Float:0, 0, 0);
if(pickupid == bf12) return SetPlayerAttachedObject(playerid, 1, 1210, 1, Float:0, Float:450, Float:0, Float:0, Float:0, Float:0, Float:0, Float:0, Float:0, 0, 0);
return 1;
}
and the Floats doesn't give errors so no problem in Floats
Re: error 017: undefined symbol "bf1" -
ACI - 10.02.2014
Try using an array instead of doing that.
Note that if you set the number of elements to 19, then the actual image in the memory will be 18 slots. So for 20 will be 19 slots.
Re: error 017: undefined symbol "bf1" -
Omar55555 - 10.02.2014
i can't understand what you're saying
what
to do with anything ?
Re: error 017: undefined symbol "bf1" -
ACI - 10.02.2014
I am saying you to create an array with any name. I gave you an example "gPI" with 20 elements. You can use them instead of the 19 variables you created.
I can show you a example (not tested):
pawn Код:
main()
{
new ACI[20]; // It has 20 slots. (Counting from 0 to 19)
ACI[5] = 9; // Set the fifth slot (OR row for having a basic concept) to hold a number 9
if(ACI[5] == 9) // If ACI with with row or slot 5 is holding 9 then:
print("ACI[5] is 9");
}
Re: error 017: undefined symbol "bf1" -
Omar55555 - 10.02.2014
ACI i did it but it adds nothing like i didn't did anything

anyone please help ?
Re: error 017: undefined symbol "bf1" -
PowerPC603 - 10.02.2014
Quote:
Originally Posted by Omar55555
i'm doing
pawn Код:
new bf1; new bf2; new bf3; new bf4; new bf5; new bf6; new bf7; new bf8; new bf9; new bf10; new bf11; new bf12; new bf13; new bf14; new bf15; new bf16; new bf17; new bf18; new bf19;
on top if the
PHP код:
public OnFilterScriptInit()
and i couldn't understand what your saying please sir help me.
|
If I understand correctly, you've created these variables INSIDE OnFilterScriptInit()?
Like this?
pawn Код:
public OnFilterScriptInit()
{
new bf1;
new bf2;
new bf3;
new bf4;
new bf5;
new bf6;
new bf7;
new bf8;
new bf9;
new bf10;
new bf11;
new bf12;
new bf13;
new bf14;
new bf15;
new bf16;
new bf17;
new bf18;
new bf19;
}
If you did that, those variables only exist for OnFilterScriptInit.
When the script has finished loading, the function has been executed and exited and those variables are destroyed.
Put them outside the function.
pawn Код:
new bf1;
new bf2;
new bf3;
new bf4;
new bf5;
new bf6;
new bf7;
new bf8;
new bf9;
new bf10;
new bf11;
new bf12;
new bf13;
new bf14;
new bf15;
new bf16;
new bf17;
new bf18;
new bf19;
public OnFilterScriptInit()
{
// Other code here
}
And as suggested, this is a horrible way to use them.
Just create an array
Then you can access them like this:
pawn Код:
if(pickupid == bf[12]) return SetPlayerAttachedObject(playerid, 1, 1210, 1, Float:42, Float:913, Float:0, Float:0, Float:0, Float:0, Float:52, Float:0, Float:0, 0, 0);
It would be easier to add new values in case you need more.
If you wanna go to 100 of those, you need to add 80 new variables. That's a lot.
With the array, you only need to increase the number between the [] from 20 to 100 and you're done.