can some one fix this error
#1

Quote:

CMD:count(playerid,params[])
{
if(PlayerInfo[playerid][pTrustedPlayer] >= 1)
{
static amount;//creating the variable, where it will store the amount, that the player chose.
if(sscanf(params,"i",amount)) return SendClientMessage(playerid,-1,"USAGE: /count <amount>");//checking if the player inputs any params, and if its an integer.
if(iscountactivated == 1) return SendClientMessage(playerid,-1,"The countdown is already activated!");//Checking if someone already started a countdown.
if(amount > 10 || amount <= 0) return SendClientMessage(playerid,-1,"The amount can't be greater than 10");//Checking if the amount is higher than 10, so therefor the player can't spam/annoy other players.
CountTimer = SetTimer("Count",1000,true);//Setting the timer, for the count down.
countamount = amount;//Setting the variable countamount to the inputted amount.
iscountactivated = 1;//Setting the iscountactivated to 1 to prevent future spam.
return 1;
}
public Count()
{
if(!iscountactivated){KillTimer(CountTimer);}//Checking if the timer is activated, if not kill the timer.
else
{
new string[4];//Creating the string variable, where we will store the count down value.
format(string,sizeof(string),"%i",countamount);//Formating it.
GameTextForAll(string,1000,3);//Showing it to everyone.
countamount--;//Counting less 1 to the count down variable.
if(countamount == -1) {iscountactivated = 0, GameTextForAll("~g~~h~Go!",1000,3);}//It's -1, because it was conflicting like, from 2 to Go. Setting the var to 0 if the count down variable reaches -1.
}
return 1;
}


error
Quote:

C:\Users\intel\Desktop\New folder (6)\filterscripts\TP.pwn(291) : warning 217: loose indentation
C:\Users\intel\Desktop\New folder (6)\filterscripts\TP.pwn(295) : warning 217: loose indentation
C:\Users\intel\Desktop\New folder (6)\filterscripts\TP.pwn(304) : warning 217: loose indentation
C:\Users\intel\Desktop\New folder (6)\filterscripts\TP.pwn(304) : error 029: invalid expression, assumed zero
C:\Users\intel\Desktop\New folder (6)\filterscripts\TP.pwn(304) : error 017: undefined symbol "cmd_count"
C:\Users\intel\Desktop\New folder (6)\filterscripts\TP.pwn(304) : error 029: invalid expression, assumed zero
C:\Users\intel\Desktop\New folder (6)\filterscripts\TP.pwn(304) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

Reply
#2

Mention the lines and use pawn tags to post codes.
Reply
#3

line 304:CMD:count(playerid,params[])
Reply
#4

pawn Код:
CMD:count(playerid,params[])
{
if(PlayerInfo[playerid][pTrustedPlayer] >= 1)
{
    static amount;//creating the variable, where it will store the amount, that the player chose.
    if(sscanf(params,"i",amount)) return SendClientMessage(playerid,-1,"USAGE: /count <amount>");//checking if the player inputs any params, and if its an integer.
    if(iscountactivated == 1) return SendClientMessage(playerid,-1,"The countdown is already activated!");//Checking if someone already started a countdown.
    if(amount > 10 || amount <= 0) return SendClientMessage(playerid,-1,"The amount can't be greater than 10");//Checking if the amount is higher than 10, so therefor the player can't spam/annoy other players.
    CountTimer = SetTimer("Count",1000,true);//Setting the timer, for the count down.
    countamount = amount;//Setting the variable countamount to the inputted amount.
    iscountactivated = 1;//Setting the iscountactivated to 1 to prevent future spam.
    return 1;
}
public Count()
{
if(!iscountactivated){KillTimer(CountTimer);}//Checking if the timer is activated, if not kill the timer.
else
    {
    new string[4];//Creating the string variable, where we will store the count down value.
    format(string,sizeof(string),"%i",countamount);//Formating it.
    GameTextForAll(string,1000,3);//Showing it to everyone.
    countamount--;//Counting less 1 to the count down variable.
    if(countamount == -1) {iscountactivated = 0, GameTextForAll("~g~~h~Go!",1000,3);}//It's -1, because it was conflicting like, from 2 to Go. Setting the var to 0 if the count down variable reaches -1.
    }
return 1;
}
Hope this help!
Reply
#5

C:\Users\intel\Desktop\New folder (6)\filterscripts\TP.pwn(312) : warning 217: loose indentation
C:\Users\intel\Desktop\New folder (6)\filterscripts\TP.pwn(316) : warning 217: loose indentation
C:\Users\intel\Desktop\New folder (6)\filterscripts\TP.pwn(325) : warning 217: loose indentation
C:\Users\intel\Desktop\New folder (6)\filterscripts\TP.pwn(325) : error 029: invalid expression, assumed zero
C:\Users\intel\Desktop\New folder (6)\filterscripts\TP.pwn(325) : error 017: undefined symbol "cmd_count"
C:\Users\intel\Desktop\New folder (6)\filterscripts\TP.pwn(325) : error 029: invalid expression, assumed zero
C:\Users\intel\Desktop\New folder (6)\filterscripts\TP.pwn(325) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#6

Quote:
Originally Posted by nonamebla
Посмотреть сообщение
C:\Users\intel\Desktop\New folder (6)\filterscripts\TP.pwn(312) : warning 217: loose indentation
C:\Users\intel\Desktop\New folder (6)\filterscripts\TP.pwn(316) : warning 217: loose indentation
C:\Users\intel\Desktop\New folder (6)\filterscripts\TP.pwn(325) : warning 217: loose indentation
C:\Users\intel\Desktop\New folder (6)\filterscripts\TP.pwn(325) : error 029: invalid expression, assumed zero
C:\Users\intel\Desktop\New folder (6)\filterscripts\TP.pwn(325) : error 017: undefined symbol "cmd_count"
C:\Users\intel\Desktop\New folder (6)\filterscripts\TP.pwn(325) : error 029: invalid expression, assumed zero
C:\Users\intel\Desktop\New folder (6)\filterscripts\TP.pwn(325) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Top of your script, add

pawn Код:
#include <zcmd>
Make sure you have the zcmd include in your pawno/include folder

And then under it add

pawn Код:
#pragma tabsize 0
Reply
#7

Quote:
Originally Posted by FunnyBear
Посмотреть сообщение
pawn Код:
#pragma tabsize 0
That is, hell, wrong.
You want to teach new guys to work around good practices instead of telling them about it?
Indention is very, very helpful. You'll find tons of examples for that, if you just ******.
Reply
#8

C:\Users\intel\Desktop\New folder (6)\filterscripts\TP.pwn(326) : error 029: invalid expression, assumed zero
C:\Users\intel\Desktop\New folder (6)\filterscripts\TP.pwn(326) : error 017: undefined symbol "cmd_count"
C:\Users\intel\Desktop\New folder (6)\filterscripts\TP.pwn(326) : error 029: invalid expression, assumed zero
C:\Users\intel\Desktop\New folder (6)\filterscripts\TP.pwn(326) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.
still i am getting this error
Reply
#9

pawn Код:
CMD:count(playerid,params[])
{
  if(PlayerInfo[playerid][pTrustedPlayer] >= 1)
  {
    static amount;//creating the variable, where it will store the amount, that the player chose.
    if(sscanf(params,"i",amount)) return SendClientMessage(playerid,-1,"USAGE: /count <amount>");//checking if the player inputs any params, and if its an integer.
    if(iscountactivated == 1) return SendClientMessage(playerid,-1,"The countdown is already activated!");//Checking if someone already started a countdown.
    if(amount > 10 || amount <= 0) return SendClientMessage(playerid,-1,"The amount can't be greater than 10");//Checking if the amount is higher than 10, so therefor the player can't spam/annoy other players.
    CountTimer = SetTimer("Count",1000,true);//Setting the timer, for the count down.
    countamount = amount;//Setting the variable countamount to the inputted amount.
    iscountactivated = 1;//Setting the iscountactivated to 1 to prevent future spam.
  }
  return 1;
}

public Count()
{
   if(!iscountactivated)
   {
        KillTimer(Count Timer);
   }//Checking if the timer is activated, if not kill the timer.
   else
   {
    new string[4];//Creating the string variable, where we will store the count down value.
    format(string,sizeof(string),"%i",countamount);//Formating it.
    GameTextForAll(string,1000,3);//Showing it to everyone.
    countamount--;//Counting less 1 to the count down variable.
    if(countamount == -1) {iscountactivated = 0, GameTextForAll("~g~~h~Go!",1000,3);}//It's -1, because it was conflicting like, from 2 to Go. Setting the var to 0 if the count down variable reaches -1.
   }
   return 1;
}
Reply
#10

still i get this error pls help

C:\Users\intel\Desktop\New folder (6)\filterscripts\TP.pwn(312) : warning 217: loose indentation
C:\Users\intel\Desktop\New folder (6)\filterscripts\TP.pwn(316) : warning 217: loose indentation
C:\Users\intel\Desktop\New folder (6)\filterscripts\TP.pwn(325) : warning 217: loose indentation
C:\Users\intel\Desktop\New folder (6)\filterscripts\TP.pwn(325) : error 029: invalid expression, assumed zero
C:\Users\intel\Desktop\New folder (6)\filterscripts\TP.pwn(325) : error 017: undefined symbol "cmd_count"
C:\Users\intel\Desktop\New folder (6)\filterscripts\TP.pwn(325) : error 029: invalid expression, assumed zero
C:\Users\intel\Desktop\New folder (6)\filterscripts\TP.pwn(325) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)