Erors in pawno,help
#1

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.
Reply
#2

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.
Reply
#3

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]);
Reply
#4

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 ;
}
Reply
#5

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.
Reply
#6

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 
;
    } 
Reply
#7

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.
Reply
#8

your postion move details are wrong

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

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

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.
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)