Need help on my countdown script -
soldierman - 28.05.2009
how i fix it ??
error 030: compound statement not closed at the end of file (started at line 39)
#include <a_samp>
#define FILTERSCRIPT
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n----------------------------------------");
print(" Countdown FilterScript");
print("----------------------------------------\n");
return 1;
}
#else
#endif
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_PINK 0xFF00FFAA
forward countdown();
new Float:X, Float:Y, Float:Z, Float:X2, Float:Y2, Float:Z2, CountStage = 0, timer, Float:dist;
new pName[MAX_PLAYER_NAME], string[25 + MAX_PLAYER_NAME], Frozen[MAX_PLAYERS];
new Freeze = 0, Locality = 1;
/*
Variables Explained:
Floats: X,Y and Z refer to the position of the player who types the command
Floats: X2, Y2 and Z2 refer to the position of the player currently being compared
CountStage determines where the counter is at, 0 means it is off
timer stores the timerid used in the KillTImer()
Float dist stores the distance found in the Distance stock
pname[] is the Playername, string[] is the string sent, frozen[] stores the players Freeze status (on(1) or off(0))
Freeze determines whether player freezing is on/off - it is changed ingame with the command /togfreeze
Locality determines whether the entire server will be effected, or just players within the defined radius - /toglocal
*/
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext,"/count",true) == 0)
{
if(CountStage ==0)
{
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "*** %s started count.", pName);
timer = SetTimer("countdown",1000,1);
CountStage = 3;
Re: Need help on my countdown script -
Gappy - 28.05.2009
You're missing some closing brackets, try this
pawn Код:
#include <a_samp>
#define FILTERSCRIPT
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n----------------------------------------");
print(" Countdown FilterScript");
print("----------------------------------------\n");
return 1;
}
#else
#endif
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_PINK 0xFF00FFAA
forward countdown();
new Float:X, Float:Y, Float:Z, Float:X2, Float:Y2, Float:Z2, CountStage = 0, timer, Float:dist;
new pName[MAX_PLAYER_NAME], string[25 + MAX_PLAYER_NAME], Frozen[MAX_PLAYERS];
new Freeze = 0, Locality = 1;
/*
Variables Explained:
Floats: X,Y and Z refer to the position of the player who types the command
Floats: X2, Y2 and Z2 refer to the position of the player currently being compared
CountStage determines where the counter is at, 0 means it is off
timer stores the timerid used in the KillTImer()
Float dist stores the distance found in the Distance stock
pname[] is the Playername, string[] is the string sent, frozen[] stores the players Freeze status (on(1) or off(0))
Freeze determines whether player freezing is on/off - it is changed ingame with the command /togfreeze
Locality determines whether the entire server will be effected, or just players within the defined radius - /toglocal
*/
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext,"/count",true) == 0)
{
if(CountStage ==0)
{
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "*** %s started count.", pName);
timer = SetTimer("countdown",1000,1);
CountStage = 3;
}
}
}
wtf, my indentation looks screwed up, but in pawn it was fine =/
Re: Need help on my countdown script -
Weirdosport - 28.05.2009
And use pawn tags in future:
Re: Need help on my countdown script -
shoru - 24.08.2009
pawn Код:
#include <a_samp>
#define FILTERSCRIPT
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n----------------------------------------");
print(" Countdown FilterScript");
print("----------------------------------------\n");
return 1;
}
#else
#endif
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_PINK 0xFF00FFAA
forward countdown();
new Float:X, Float:Y, Float:Z, Float:X2, Float:Y2, Float:Z2, CountStage = 0, timer, Float:dist;
new pName[MAX_PLAYER_NAME], string[25 + MAX_PLAYER_NAME], Frozen[MAX_PLAYERS];
new Freeze = 0, Locality = 1;
/*
Variables Explained:
Floats: X,Y and Z refer to the position of the player who types the command
Floats: X2, Y2 and Z2 refer to the position of the player currently being compared
CountStage determines where the counter is at, 0 means it is off
timer stores the timerid used in the KillTImer()
Float dist stores the distance found in the Distance stock
pname[] is the Playername, string[] is the string sent, frozen[] stores the players Freeze status (on(1) or off(0))
Freeze determines whether player freezing is on/off - it is changed ingame with the command /togfreeze
Locality determines whether the entire server will be effected, or just players within the defined radius - /toglocal
*/
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext,"/count",true) == 0)
{
if(CountStage ==0)
{
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "*** %s started count.", pName);
timer = SetTimer("countdown",1000,1);
CountStage = 3;
}
}
}
Re: Need help on my countdown script -
soldierman - 25.08.2009
i get C:\Documents and Settings\Bradley Dodd\My Documents\countdown.pwn(46) : warning 203: symbol is never used: "Freeze"
C:\Documents and Settings\Bradley Dodd\My Documents\countdown.pwn(46) : warning 203: symbol is never used: "Frozen"
C:\Documents and Settings\Bradley Dodd\My Documents\countdown.pwn(46) : warning 203: symbol is never used: "Locality"
C:\Documents and Settings\Bradley Dodd\My Documents\countdown.pwn(46) : warning 203: symbol is never used: "X"
C:\Documents and Settings\Bradley Dodd\My Documents\countdown.pwn(46) : warning 203: symbol is never used: "X2"
C:\Documents and Settings\Bradley Dodd\My Documents\countdown.pwn(46) : warning 203: symbol is never used: "Y"
C:\Documents and Settings\Bradley Dodd\My Documents\countdown.pwn(46) : warning 203: symbol is never used: "Y2"
C:\Documents and Settings\Bradley Dodd\My Documents\countdown.pwn(46) : warning 203: symbol is never used: "Z"
C:\Documents and Settings\Bradley Dodd\My Documents\countdown.pwn(46) : warning 203: symbol is never used: "Z2"
C:\Documents and Settings\Bradley Dodd\My Documents\countdown.pwn(46) : warning 203: symbol is never used: "dist"
C:\Documents and Settings\Bradley Dodd\My Documents\countdown.pwn(41) : warning 204: symbol is assigned a value that is never used: "timer"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
11 Warnings.
Re: Need help on my countdown script -
James_Alex - 25.08.2009
you must continue scripting with this symbols