[HELP] Please Help me!!! -
uldissUP - 28.08.2011
Hey guys i am trying to make movable gate's can some one send me in pm or reply how to do it... please put all the code i tryed to do mine it dose every thing correct but give's 3 erro's
keeps say'ing
Undefined Symbol"gate2"
Undefined Symbol"gate2"
Undefined Symbol"gate2"
so i cant do any thing i did do the
new gate2;
still didnt change any thing any one send me a code please and i am doing this in a FS
Re: [HELP] Please Help me!!! -
Ironboy - 29.08.2011
Can you show the code so it will be easy to fix.
Re: [HELP] Please Help me!!! -
uprp - 29.08.2011
did you forward it?
Re: [HELP] Please Help me!!! -
=WoR=G4M3Ov3r - 29.08.2011
Show us some codes, so we can help you O.o
Re: [HELP] Please Help me!!! -
[P4] - 29.08.2011
I guess you need:
on top of your script
Re: [HELP] Please Help me!!! -
a_big - 30.08.2011
Quote:
Originally Posted by [P4]
I guess you need:
on top of your script 
|
read what he said
Quote:
so i cant do any thing i did do the
new gate2;
|
Re: [HELP] Please Help me!!! -
=WoR=Varth - 30.08.2011
Quote:
Originally Posted by a_big
read what he said
|
He didn't said he made it on top of his script.
Re: [HELP] Please Help me!!! -
Kwarde - 30.08.2011
Scripting is serverside, not clientside (CLIENT Support). This is in the wrong board. Also, please use a better defined title. This entire board (Client Support) is for help, so it's not needed to make topics named (and similar) "Help me". A better name would be "Undefined symbol". However,
where did you place 'new gate2;'?. Here's an example:
pawn Код:
#include <a_samp>
new gate2; //HERE
public OnFilterScriptInit()
{
gate2 = CreateObject(params);
OpenGate(2);
return 1;
}
stock OpenGate(gate_id)
{
switch(gate_id)
{
case 2: MoveObject(gate2, params);
default: return printf("ERROR: Gate %d does not exist", gate_id);
}
return 1;
}
Something like that should work. This won't work:
pawn Код:
#include <a_samp>
public OnFilterScriptInit()
{
new gate2; //HERE
gate2 = CreateObject(params);
OpenGate(2);
return 1;
}
stock OpenGate(gate_id)
{
switch(gate_id)
{
case 2: MoveObject(gate2, params);
default: return printf("ERROR: Gate %d does not exist", gate_id);
}
return 1;
}
Why will this second way not work? - Because 'gate2' does now only exist in OnFilterScriptInit. It looks like this:
1- Filterscript is initialising
2- Create temporary variable named 'gate2' (well, PAWN doesn't use variables in .amx, but you get me I guess)
3- Set the value of 'gate2' to the new created object and create the object
4.1- Running OpenGate with integer 2
4.2- Check what the gate_id is. It is case, running the code on 'case 2'
4.3- Move Object 'gate2'. ERROR!! Gate2 does not exist in the OpenGate part. Problem!
5- Remove the variable 'gate2' and return 1 (OnFilterScriptInit again)
I hope that you understand that.