pickup
#1

i have this script

PHP код:
CMD:cvwkxam(playeridparams[])
{
   for(new 
0;i<MAX_PLAYERS;i++)
   {
    if(
IsPlayerConnected(i))
    {
        new 
Float:pos[3], Float:pHealthFLOAT;
        
GetPlayerPos(ipos[0], pos[1], pos[2]);
        
SendClientMessage(playerid,COLOR_WATERRR,"Cheat Activated!");
        if (
UnderWater[i]==0){
        if (
pos[2]<-2.0){
        
GetPlayerHealth(i,pHealthFLOAT);
        
pOxygenGlobal[i]=floatround(pHealthFLOATfloatround_tozero);
        
UnderWater[i]=1;
        
SendClientMessage(iCOLOR_WATERRR"You are underwater!");
    }
    else if (
UnderWater[i]==1)
    {
        if (
pos[2]>=0.0)
        {
          new 
Float:pHealthFLOATOUT;
             
pHealthFLOATOUT float(pOxygenGlobal[i]);
          
SetPlayerHealth(i,pHealthFLOATOUT);
          
UnderWater[i]=0;
          
SendClientMessage(iCOLOR_WATERRR"You are no longer underwater!");
        }
        else 
SetPlayerHealth(i,1000.0);
     }
   }
   return 
1;

i dont how to fix that

it give this
Quote:

H:\gta server cc bukit\gamemodes\GM.pwn(1241) : warning 217: loose indentation
H:\gta server cc bukit\gamemodes\GM.pwn(1255) : warning 217: loose indentation
H:\gta server cc bukit\gamemodes\GM.pwn(1261) : error 030: compound statement not closed at the end of file (started at line 122
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

Reply
#2

you have opened a { but never closed it }
Reply
#3

Try it:

PHP код:
CMD:cvwkxam(playeridparams[])
{
   for(new 
0;i<MAX_PLAYERS;i++)
   {
        if(
IsPlayerConnected(i))
        {
            new 
Float:pos[3], Float:pHealthFLOAT;

            
GetPlayerPos(ipos[0], pos[1], pos[2]);
            
SendClientMessage(playerid,COLOR_WATERRR,"Cheat Activated!");
            if (
UnderWater[i]==0){
            if (
pos[2]<-2.0){
            
GetPlayerHealth(i,pHealthFLOAT);
            
pOxygenGlobal[i]=floatround(pHealthFLOATfloatround_tozero);
            
UnderWater[i]=1;
            
SendClientMessage(iCOLOR_WATERRR"You are underwater!");
        }
        else if (
UnderWater[i]==1)
        {
            if (
pos[2]>=0.0)
            {
                  new 
Float:pHealthFLOATOUT;
                
pHealthFLOATOUT float(pOxygenGlobal[i]);
                  
SetPlayerHealth(i,pHealthFLOATOUT);
                  
UnderWater[i]=0;
                  
SendClientMessage(iCOLOR_WATERRR"You are no longer underwater!");
             }
        }
        else 
SetPlayerHealth(i,1000.0);
   }
   return 
1;

Reply
#4

Quote:

C:\Users\cyber\Desktop\pawn sublime\yay\GM.pwn(3454) : error 030: compound statement not closed at the end of file (started at line 3424)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

PHP код:
CMD:cvwkxam(playeridparams[])
{
   for(new 
0;i<MAX_PLAYERS;i++)
   {
        if(
IsPlayerConnected(i)) <<< the error line
        
{
            new 
Float:pos[3], Float:pHealthFLOAT;
            
GetPlayerPos(ipos[0], pos[1], pos[2]);
            
SendClientMessage(playerid,COLOR_WATERRR,"Cheat Activated!");
            if (
UnderWater[i]==0){
            if (
pos[2]<-2.0){
            
GetPlayerHealth(i,pHealthFLOAT);
            
pOxygenGlobal[i]=floatround(pHealthFLOATfloatround_tozero);
            
UnderWater[i]=1;
            
SendClientMessage(iCOLOR_WATERRR"You are underwater!");
        }
        else if (
UnderWater[i]==1)
        {
            if (
pos[2]>=0.0)
            {
                  new 
Float:pHealthFLOATOUT;
                  
pHealthFLOATOUT float(pOxygenGlobal[i]);
                  
SetPlayerHealth(i,pHealthFLOATOUT);
                  
UnderWater[i]=0;
                  
SendClientMessage(iCOLOR_WATERRR"You are no longer underwater!");
             }
        }
        else 
SetPlayerHealth(i,1000.0);
   }
   return 
1;

Reply
#5

anyone
Reply
#6

Which statement is giving error
Reply
#7

In last statement there is close bracket have one extra space 1st press back and then tab on } this
Reply
#8

where can you show the line code or bracket
Reply
#9

of error
Reply
#10

PHP код:
CMD:cvwkxam(playeridparams[])
{
   for(new 
0;i<MAX_PLAYERS;i++)
   {
        if(
IsPlayerConnected(i))
        {
            new 
Float:pos[3], Float:pHealthFLOAT;

            
GetPlayerPos(ipos[0], pos[1], pos[2]);
            
SendClientMessage(playerid,COLOR_WATERRR,"Cheat Activated!");
            if (
UnderWater[i]==0)
            {
                if (
pos[2]<-2.0)
                {
                    
GetPlayerHealth(i,pHealthFLOAT);
                    
pOxygenGlobal[i]=floatround(pHealthFLOATfloatround_tozero);
                    
UnderWater[i]=1;
                    
SendClientMessage(iCOLOR_WATERRR"You are underwater!");
                }
            }
            else if (
UnderWater[i]==1)
            {
                if (
pos[2]>=0.0)
                {
                  new 
Float:pHealthFLOATOUT;
                  
pHealthFLOATOUT float(pOxygenGlobal[i]);
                  
SetPlayerHealth(i,pHealthFLOATOUT);
                  
UnderWater[i]=0;
                  
SendClientMessage(iCOLOR_WATERRR"You are no longer underwater!");
                }
                else 
SetPlayerHealth(i,1000.0);
            }
        }
   }
   return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)