[HELP] Please Help me!!!
#1

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
Reply
#2

Can you show the code so it will be easy to fix.
Reply
#3

did you forward it?
Reply
#4

Show us some codes, so we can help you O.o
Reply
#5

I guess you need:
pawn Код:
new gate2;
on top of your script
Reply
#6

Quote:
Originally Posted by [P4]
Посмотреть сообщение
I guess you need:
pawn Код:
new gate2;
on top of your script
read what he said
Quote:

so i cant do any thing i did do the
new gate2;

Reply
#7

Quote:
Originally Posted by a_big
Посмотреть сообщение
read what he said
He didn't said he made it on top of his script.
Reply
#8

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)