SA-MP Forums Archive
{HELP}please can you see some mistake here GATES - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: {HELP}please can you see some mistake here GATES (/showthread.php?tid=91024)



{HELP}please can you see some mistake here GATES - krisko - 11.08.2009

can you see something wrong here i cant but i am still a noob and tryed to do it some guy told me how its done but i dident understand right can someone please explane or maybe edit it and post the code bellow so i can see it and learn from it please help
Quote:

#include <a_samp>

new Gate;

forward GateClose(playerid);

// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#define Filterscript
#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" house gate's by Krisko_Milchev");
print("--------------------------------------\n");
return 1;
}

public OnFilterScriptExit()
{
return 1;
}

#else

main()
{
print("\n----------------------------------");
print(" house gate's by Krisko_Milchev");
print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
Gate =CreateObject(994, -767.1913, 92.0703,349.5082, 0, 0, 0, 0, 0, 0);
CreateObject(994, -767.1913 ,92.0703, 349.5082, 0 , 0 ,0 , 0, 0, 0);
CreateObject(994, -767.1913, 92.0703, 349.5082, 0, 0, 0, 0, 0, 0);
return 1;
}

public OnGameModeExit()
{
return 1;
}

public GateClose(playerid)
{
DestroyObject(gate);
gate = CreateObject(994, -767.1960, 92.0638, 266.4016, 0, 0, 0, 0, 0 , 0);
return 1
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext, "/gateopen", true)==0)
{
MoveObject(Gate,-767.1913,92.0703,349.5082,0,0,0,0,0,0);
SendClientMessage(playerid, BLUE, "The house door has been opened please wait 10 seconds!");
SetTimer("GateClose1", 10000, 0);
return 1;
}

((sorry for my bad english))
P.S btw the place where i want to put the gate's is the furst house from the right left side after the sind Vinewood


here is the error
Quote:

D:\Нова папка (3)\samp02Xserver.win32\pawno\gatehaha.pwn(39) : warning 202: number of arguments does not match definition
D:\Нова папка (3)\samp02Xserver.win32\pawno\gatehaha.pwn(39) : warning 202: number of arguments does not match definition
D:\Нова папка (3)\samp02Xserver.win32\pawno\gatehaha.pwn(39) : warning 202: number of arguments does not match definition
D:\Нова папка (3)\samp02Xserver.win32\pawno\gatehaha.pwn(40) : warning 202: number of arguments does not match definition
D:\Нова папка (3)\samp02Xserver.win32\pawno\gatehaha.pwn(40) : warning 202: number of arguments does not match definition
D:\Нова папка (3)\samp02Xserver.win32\pawno\gatehaha.pwn(40) : warning 202: number of arguments does not match definition
D:\Нова папка (3)\samp02Xserver.win32\pawno\gatehaha.pwn(41) : warning 202: number of arguments does not match definition
D:\Нова папка (3)\samp02Xserver.win32\pawno\gatehaha.pwn(41) : warning 202: number of arguments does not match definition
D:\Нова папка (3)\samp02Xserver.win32\pawno\gatehaha.pwn(41) : warning 202: number of arguments does not match definition
D:\Нова папка (3)\samp02Xserver.win32\pawno\gatehaha.pwn(42) : warning 217: loose indentation
D:\Нова папка (3)\samp02Xserver.win32\pawno\gatehaha.pwn(52) : error 017: undefined symbol "gate"
D:\Нова папка (3)\samp02Xserver.win32\pawno\gatehaha.pwn(53) : error 017: undefined symbol "gate"
D:\Нова папка (3)\samp02Xserver.win32\pawno\gatehaha.pwn(53) : warning 202: number of arguments does not match definition
D:\Нова папка (3)\samp02Xserver.win32\pawno\gatehaha.pwn(53) : warning 202: number of arguments does not match definition
D:\Нова папка (3)\samp02Xserver.win32\pawno\gatehaha.pwn(53) : warning 202: number of arguments does not match definition
D:\Нова папка (3)\samp02Xserver.win32\pawno\gatehaha.pwn(55) : error 001: expected token: ";", but found "}"
D:\Нова папка (3)\samp02Xserver.win32\pawno\gatehaha.pwn(60) : warning 202: number of arguments does not match definition
D:\Нова папка (3)\samp02Xserver.win32\pawno\gatehaha.pwn(60) : warning 202: number of arguments does not match definition
D:\Нова папка (3)\samp02Xserver.win32\pawno\gatehaha.pwn(60) : warning 202: number of arguments does not match definition
D:\Нова папка (3)\samp02Xserver.win32\pawno\gatehaha.pwn(60) : warning 202: number of arguments does not match definition
D:\Нова папка (3)\samp02Xserver.win32\pawno\gatehaha.pwn(60) : warning 202: number of arguments does not match definition
D:\Нова папка (3)\samp02Xserver.win32\pawno\gatehaha.pwn(61) : error 017: undefined symbol "BLUE"
D:\Нова папка (3)\samp02Xserver.win32\pawno\gatehaha.pwn(63) : warning 217: loose indentation
D:\Нова папка (3)\samp02Xserver.win32\pawno\gatehaha.pwn(65) : error 030: compound statement not closed at the end of file (started at line 5
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Errors.




Re: {HELP}please can you see some mistake here GATES - RyDeR` - 11.08.2009

what's the error?


Re: {HELP}please can you see some mistake here GATES - pagie1111 - 11.08.2009

replace your public GateClose(playerid) with this

pawn Код:
public GateClose(playerid)
{
   DestroyObject(gate);
   gate = CreateObject(994, -767.1960, 92.0638, 266.4016, 0, 0, 0, 0, 0 , 0);
}



Re: {HELP}please can you see some mistake here GATES - krisko - 11.08.2009

i tryed you way but when i hit to cmplie it it give'ss me this error
Quote:

:\Нова папка (3)\samp02Xserver.win32\pawno\asdfgh.pwn(43) : warning 202: number of arguments does not match definition
D:\Нова папка (3)\samp02Xserver.win32\pawno\asdfgh.pwn(43) : warning 202: number of arguments does not match definition
D:\Нова папка (3)\samp02Xserver.win32\pawno\asdfgh.pwn(43) : warning 202: number of arguments does not match definition
D:\Нова папка (3)\samp02Xserver.win32\pawno\asdfgh.pwn(44) : warning 202: number of arguments does not match definition
D:\Нова папка (3)\samp02Xserver.win32\pawno\asdfgh.pwn(44) : warning 202: number of arguments does not match definition
D:\Нова папка (3)\samp02Xserver.win32\pawno\asdfgh.pwn(44) : warning 202: number of arguments does not match definition
D:\Нова папка (3)\samp02Xserver.win32\pawno\asdfgh.pwn(45) : warning 202: number of arguments does not match definition
D:\Нова папка (3)\samp02Xserver.win32\pawno\asdfgh.pwn(45) : warning 202: number of arguments does not match definition
D:\Нова папка (3)\samp02Xserver.win32\pawno\asdfgh.pwn(45) : warning 202: number of arguments does not match definition
D:\Нова папка (3)\samp02Xserver.win32\pawno\asdfgh.pwn(57) : warning 202: number of arguments does not match definition
D:\Нова папка (3)\samp02Xserver.win32\pawno\asdfgh.pwn(57) : warning 202: number of arguments does not match definition
D:\Нова папка (3)\samp02Xserver.win32\pawno\asdfgh.pwn(57) : warning 202: number of arguments does not match definition
D:\Нова папка (3)\samp02Xserver.win32\pawno\asdfgh.pwn(63) : warning 202: number of arguments does not match definition
D:\Нова папка (3)\samp02Xserver.win32\pawno\asdfgh.pwn(63) : warning 202: number of arguments does not match definition
D:\Нова папка (3)\samp02Xserver.win32\pawno\asdfgh.pwn(63) : warning 202: number of arguments does not match definition
D:\Нова папка (3)\samp02Xserver.win32\pawno\asdfgh.pwn(63) : warning 202: number of arguments does not match definition
D:\Нова папка (3)\samp02Xserver.win32\pawno\asdfgh.pwn(63) : warning 202: number of arguments does not match definition
D:\Нова папка (3)\samp02Xserver.win32\pawno\asdfgh.pwn(6 : error 030: compound statement not closed at the end of file (started at line 61)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.




Re: {HELP}please can you see some mistake here GATES - PowerSurge - 21.08.2009

pawn Код:
#include <a_samp>

#define BLUE 0x0000BBAA // Color Code

new Gate;

forward GateClose(playerid);

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" house gate's by Krisko_Milchev");
    print("--------------------------------------\n");
       Gate = CreateObject(994, -767.1913, 92.0703,349.5082, 0, 0, 0, 0, 0, 0);
       CreateObject(994, -767.1913 ,92.0703, 349.5082, 0 , 0 ,0 , 0, 0, 0);
       CreateObject(994, -767.1913, 92.0703, 349.5082, 0, 0, 0, 0, 0, 0);
    return 1;
}
public OnFilterScriptExit()
{
    return 1;
}


public GateClose(playerid)
{
MoveObject(Gate,-767.1913, 92.0703,349.5082, 0, 0, 0, 0, 0, 0); // Looks more realistic :)
     return 1; //You put 'return 1', remember the Semi-Colons! (;)
   }  
public OnPlayerCommandText(playerid, cmdtext[])
{
  if (strcmp(cmdtext, "/gateopen", true)==0)
  {
    MoveObject(Gate,-767.1913,92.0703,349.5082,0,0,0,0,0,0);
    SendClientMessage(playerid, BLUE, "The house door has been opened please wait 10 seconds!");
    SetTimer("GateClose", 10000, 0); // You defined GateClose, and put GateClose1.
  return 1;
  }
return 0;
} // At the end of this public, you need 'return 0;'.
Changes highlighted in red.
Quote:

#include <a_samp>

#define COLOR_BLUE 0x0000BBAA // You didnt define the color!
new Gate;

forward GateClose(playerid);

public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" house gate's by Krisko_Milchev");
print("--------------------------------------\n");
Gate = CreateObject(994, -767.1913, 92.0703,349.5082, 0, 0, 0, 0, 0, 0);
CreateObject(994, -767.1913 ,92.0703, 349.5082, 0 , 0 ,0 , 0, 0, 0);
CreateObject(994, -767.1913, 92.0703, 349.5082, 0, 0, 0, 0, 0, 0);
return 1;
}

public OnFilterScriptExit()
{
return 1;
}


public GateClose(playerid)
{
MoveObject(Gate,-767.1913, 92.0703,349.5082, 0, 0, 0, 0, 0, 0); // Looks more realistic
return 1; //You put 'return 1', remember the Semi-Colons! (
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext, "/gateopen", true)==0)
{
MoveObject(Gate,-767.1913,92.0703,349.5082,0,0,0,0,0,0);
SendClientMessage(playerid, BLUE, "The house door has been opened please wait 10 seconds!");
SetTimer("GateClose", 10000, 0); // You defined GateClose, and put GateClose1.
return 1;
}
return 0;
}
// At the end of this public, you need 'return 0;'.

Hope this helped!