SA-MP Forums Archive
Erors in pawno,help - 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)
+--- Thread: Erors in pawno,help (/showthread.php?tid=405750)



Erors in pawno,help - armins - 07.01.2013

hello , im new here and im beginer of scripting.
I scripted a movable gate.When i compile there is an errors.I dont know what i should to do.

Can anyone help me to fix this problems please ?

Here is the script: (sorry i dont know put pawn code ) :


PHP код:
{
       if(
strcmp(cmd"/otvori1"true) == 0)
       
MoveObject(gate1,999.79998779297, -644.90002441406121)
       
SendClientMessage(playerid,COLOR_LIGHTRED,"Otvarate kapiju Velicanstvenog")
       return 
1;
}
{
          if(
strcmp(cmd,"/zatvori1",true) == 0)
       
MoveObject(gate1,999, -645.59997558594120.09999847412)
       
SendClientMessage(playerid,COLOR_LIGHTRED,"Zatvorili ste kapiju.Hvala")
       return 
;

When i compile there is errors :

PHP код:
C:\Program Files\Rockstar Games\GTA San Andreas\ravens\gamemodes\larp.pwn(26381) : warning 217loose indentation
C
:\Program Files\Rockstar Games\GTA San Andreas\ravens\gamemodes\larp.pwn(26383) : warning 202number of arguments does not match definition
C
:\Program Files\Rockstar Games\GTA San Andreas\ravens\gamemodes\larp.pwn(26388) : warning 225unreachable code
C
:\Program Files\Rockstar Games\GTA San Andreas\ravens\gamemodes\larp.pwn(26390) : warning 202number of arguments does not match definition
C
:\Program Files\Rockstar Games\GTA San Andreas\ravens\gamemodes\larp.pwn(26395) : warning 225unreachable code
C
:\Program Files\Rockstar Games\GTA San Andreas\ravens\gamemodes\larp.pwn(26395) : warning 217loose indentation
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase 
Please help to solve every problem.Sory for my bad english.


Re: Erors in pawno,help - JustinAn - 08.01.2013

Please show us which line that occurs the errors.

And when you post the script try using this formula.

Код:
[.pawn]
Your code here
[./pawn]
Just remove the period.


Re: Erors in pawno,help - blackbhuta - 08.01.2013

This is parameter for MoveObject
(objectid, Float:X, Float:Y, Float:Z, Float:Speed, Float:RotX = -1000.0, Float:RotY = -1000.0, Float:RotZ = -1000.0)

So, you can try:
MoveObject(gate1, 999.79998779297, -644.90002441406, 121, [speed], [RotX], [RotY],[RotZ]);


Re: Erors in pawno,help - [HK]Ryder[AN] - 08.01.2013

try this
pawn Код:
if(strcmp(cmd, "/otvori1", true) == 0) {
MoveObject(gate1,999.79998779297, -644.90002441406, 121);
SendClientMessage(playerid,COLOR_LIGHTRED,"Otvarat e kapiju Velicanstvenog");
return 1;
}


if(strcmp(cmd,"/zatvori1",true) == 0) {
MoveObject(gate1,999, -645.59997558594, 120.09999847412);
SendClientMessage(playerid,COLOR_LIGHTRED,"Zatvori li ste kapiju.Hvala");
return 1 ;
}



Re: Erors in pawno,help - armins - 08.01.2013

Quote:
Originally Posted by blackbhuta
Посмотреть сообщение
This is parameter for MoveObject
(objectid, Float:X, Float:Y, Float:Z, Float:Speed, Float:RotX = -1000.0, Float:RotY = -1000.0, Float:RotZ = -1000.0)

So, you can try:
MoveObject(gate1, 999.79998779297, -644.90002441406, 121, [speed], [RotX], [RotY],[RotZ]);
I tried all of these examples,but id doesnt working.There is erors again.This is picture where i will show you lines in pawno and new erors.
On the picture you will see lines and erros,please help.





Sorry but i dont know saze off picture.


Re : Erors in pawno,help - yusei - 08.01.2013

PHP код:
    if(!strcmp(cmdtext"/otvori1"true))
    {
         
MoveObject(gate1,999.79998779297, -644.9000244140612110);
         
SendClientMessage(playerid,COLOR_LIGHTRED,"Otvarat e kapiju Velicanstvenog");
         return 
1;
    }
    if(!
strcmp(cmdtext"/zatvori1"true))
    {
         
MoveObject(gate1,999, -645.59997558594120.0999984741210);
         
SendClientMessage(playerid,COLOR_LIGHTRED,"Zatvori li ste kapiju.Hvala");
         return 
;
    } 



Re: Re : Erors in pawno,help - armins - 08.01.2013

Quote:
Originally Posted by yusei
Посмотреть сообщение
PHP код:
    if(!strcmp(cmdtext"/otvori1"true))
    {
         
MoveObject(gate1,999.79998779297, -644.9000244140612110);
         
SendClientMessage(playerid,COLOR_LIGHTRED,"Otvarat e kapiju Velicanstvenog");
         return 
1;
    }
    if(!
strcmp(cmdtext"/zatvori1"true))
    {
         
MoveObject(gate1,999, -645.59997558594120.0999984741210);
         
SendClientMessage(playerid,COLOR_LIGHTRED,"Zatvori li ste kapiju.Hvala");
         return 
;
    } 
Im know that im boring,but when i did this,there was 26 errors.Sorry budy.


Re : Erors in pawno,help - yusei - 08.01.2013

your postion move details are wrong

https://sampwiki.blast.hk/wiki/MoveObject

MoveObject(gate1, X, Y, Z, Speed, RX,RY,Rz);


Re: Re : Erors in pawno,help - armins - 08.01.2013

Quote:
Originally Posted by yusei
Посмотреть сообщение
your postion move details are wrong

https://sampwiki.blast.hk/wiki/MoveObject

MoveObject(gate1, X, Y, Z, Speed, RX,RY,Rz);
i fixed it thanks man,but i have two warnings loose identitation.....what should i do to fix that ? all these examples is not fixed it.


Re: Erors in pawno,help - Ryan McDuff - 08.01.2013

Post a picture of the line so we can see what you've done incorrectly, it might be better to "undo" the changes that you've made until somebody has helped you with this issue, but it seems like there already is above.