Loose indentation problem ...
#1

I've tried any way that i'm possible to know but still get this error , can anyone help me ?
Код:
D:\SAMP Server\filterscripts\testingFS.pwn(47) : warning 217: loose indentation
D:\SAMP Server\filterscripts\testingFS.pwn(51) : warning 217: loose indentation
D:\SAMP Server\filterscripts\testingFS.pwn(55) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Warnings.
The Error script using ZCMD:
pawn Код:
CMD:cableon(playerid,params[])
{
new Float:x1, Float:y2, Float:z3;
GetObjectPos(cabin_01, x1, y2, z3);
     if ((x1 == 827.7750 && y2 == -2063.8896) && z3 == 20.6669)
{
    MoveObject(cabin_01, 829.9734, -2332.8184, 19.2912, 5.11, 0.0, 0.0, 270.0);
}
else if ((x1 == 829.9734 && y2 == -2332.8184) && z3 == 19.2912)
{
    MoveObject(cabin_01, 827.7750, -2063.88964, 20.6669, 5.11, 0.0, 0.0, 90.0);
}
return 1;
}
Reply
#2

Here:
pawn Код:
// define this symbol as object to move
new cabin_01;

//[...]
 // Error Part
CMD:cableon(playerid,params[])
{
new Float:x1, Float:y2, Float:z3;
GetObjectPos(cabin_01, x1, y2, z3);
     if ((x1 == 827.7750 && y2 == -2063.8896) && z3 == 20.6669)
{
    MoveObject(cabin_01, 829.9734, -2332.8184, 19.2912, 5.11, 0.0, 0.0, 270.0);
}
else if ((x1 == 829.9734 && y2 == -2332.8184) && z3 == 19.2912)
{
    MoveObject(cabin_01, 827.7750, -2063.88964, 20.6669, 5.11, 0.0, 0.0, 90.0);
}
return 1;
}

// OnGameModeInit
cabin_01 = CreateObject(18879, 827.59424, -2063.88013, 22.08874,   0.00000, 0.00000, 0.00000);
Reply
#3

He meant Indenting the code will solve the problem
this problem is caused due to bad indentation
Reply
#4

Quote:
Originally Posted by BroZeus
Посмотреть сообщение
He meant Indenting the code will solve the problem
this problem is caused due to bad indentation
Can you help me to fix the code ? i'm still noob at PAWN scripting .
Reply
#5

****** already told the solution ._.
Reply
#6

Quote:
Originally Posted by bietdoidao
Посмотреть сообщение
Can you help me to fix the code ? i'm still noob at PAWN scripting .
http://en.wikipedia.org/wiki/Indent_style

pawn Код:
CMD:cableon(playerid,params[])
{
    new Float:x1, Float:y2, Float:z3;
    GetObjectPos(cabin_01, x1, y2, z3);
    if ((x1 == 827.7750 && y2 == -2063.8896) && z3 == 20.6669)
    {
        MoveObject(cabin_01, 829.9734, -2332.8184, 19.2912, 5.11, 0.0, 0.0, 270.0);
    }
    else if ((x1 == 829.9734 && y2 == -2332.8184) && z3 == 19.2912)
    {
        MoveObject(cabin_01, 827.7750, -2063.88964, 20.6669, 5.11, 0.0, 0.0, 90.0);
    }
    return 1;
}
Reply
#7

Thanks Flake , i got it now.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)