Electric Gates Script Problem!
#1

hey. i was trying to make an electric Gate but i faild at some point.. and i cant understand whats the issue, if you could help me that would be grate.

Here is the script i wrote:

Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/Opengate", cmdtext, true, 10) == 0)
{
moveobject(968, 1544.70703125, -1630.7634277344, 13.095315933228, 0, 359.49487304688, 269.87365722656);
// change positions where u want to move gates
}
if(strcmp("/Closegate", true) == 0) //
{
moveobject(968, 1544.7027587891, -1630.9697265625, 13.145315170288, 0, 269.17498779297, 269.87536621094);
//
return 1;
}
return 0;
}

Heres the Errors i get:

Quote:

C:\my stuff\my games\GTA san nadreas\GTA San Andreas\SAMP\gamemodes\E Gate 1.pwn(135) : error 017: undefined symbol "moveobject"
C:\my stuff\my games\GTA san nadreas\GTA San Andreas\SAMP\gamemodes\E Gate 1.pwn(13 : error 035: argument type mismatch (argument 2)
C:\my stuff\my games\GTA san nadreas\GTA San Andreas\SAMP\gamemodes\E Gate 1.pwn(140) : error 017: undefined symbol "moveobject"
C:\my stuff\my games\GTA san nadreas\GTA San Andreas\SAMP\gamemodes\E Gate 1.pwn(142) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.

I Would be more the gratefull for help


If someone could answer its good, but if someone could give me the way how to do it + the answer it will be even better.

i cant understand i from the tut's
So if can someone put the script here, with Locations, like tell me what to write and where, so id understand it evrything.
Thanks.
Reply
#2

[quote]public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/Opengate", cmdtext, true, 10) == 0)
{
MoveObject(968, 1544.70703125, -1630.7634277344, 13.095315933228, 0, 359.49487304688, 269.87365722656);
// change positions where u want to move gates
return 1;
}
if(strcmp("/Closegate", true) == 0) //
{
MoveObject(968, 1544.7027587891, -1630.9697265625, 13.145315170288, 0, 269.17498779297, 269.87536621094);
//
return 1;
}

Try that! post any error's. Alt look / post in my topic
Reply
#3

Quote:

C:\my stuff\my games\GTA san nadreas\GTA San Andreas\SAMP\gamemodes\E Gate 1.pwn(94) : warning 202: number of arguments does not match definition
C:\my stuff\my games\GTA san nadreas\GTA San Andreas\SAMP\gamemodes\E Gate 1.pwn(94) : warning 202: number of arguments does not match definition
C:\my stuff\my games\GTA san nadreas\GTA San Andreas\SAMP\gamemodes\E Gate 1.pwn(97) : error 035: argument type mismatch (argument 2)
C:\my stuff\my games\GTA san nadreas\GTA San Andreas\SAMP\gamemodes\E Gate 1.pwn(99) : warning 202: number of arguments does not match definition
C:\my stuff\my games\GTA san nadreas\GTA San Andreas\SAMP\gamemodes\E Gate 1.pwn(99) : warning 202: number of arguments does not match definition
C:\my stuff\my games\GTA san nadreas\GTA San Andreas\SAMP\gamemodes\E Gate 1.pwn(101) : warning 217: loose indentation
C:\my stuff\my games\GTA san nadreas\GTA San Andreas\SAMP\gamemodes\E Gate 1.pwn(103) : warning 217: loose indentation
C:\my stuff\my games\GTA san nadreas\GTA San Andreas\SAMP\gamemodes\E Gate 1.pwn(105) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

This is the error i get whene i put what you said:

Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/Opengate", cmdtext, true, 10) == 0)
{
MoveObject(968, 1544.70703125, -1630.7634277344, 13.095315933228, 0, 359.49487304688, 269.87365722656);
// change positions where u want to move gates
}
if(strcmp("/Closegate", true) == 0) //
{
MoveObject(968, 1544.7027587891, -1630.9697265625, 13.145315170288, 0, 269.17498779297, 269.87536621094);
//
return 1;
}
return 1;
}
return 0;
}

Quote:

Note: i only Added What you said in the script, Clean Page, and then this text, am i wrong?
i havent changed anything but this.

Reply
#4

edited my post, try again
Reply
#5

Still dosent work..

Quote:

C:\my stuff\my games\GTA san nadreas\GTA San Andreas\SAMP\gamemodes\E Gate 1.pwn(93) : warning 202: number of arguments does not match definition
C:\my stuff\my games\GTA san nadreas\GTA San Andreas\SAMP\gamemodes\E Gate 1.pwn(93) : warning 202: number of arguments does not match definition
C:\my stuff\my games\GTA san nadreas\GTA San Andreas\SAMP\gamemodes\E Gate 1.pwn(95) : warning 225: unreachable code
C:\my stuff\my games\GTA san nadreas\GTA San Andreas\SAMP\gamemodes\E Gate 1.pwn(95) : warning 217: loose indentation
C:\my stuff\my games\GTA san nadreas\GTA San Andreas\SAMP\gamemodes\E Gate 1.pwn(95) : error 035: argument type mismatch (argument 2)
C:\my stuff\my games\GTA san nadreas\GTA San Andreas\SAMP\gamemodes\E Gate 1.pwn(97) : warning 202: number of arguments does not match definition
C:\my stuff\my games\GTA san nadreas\GTA San Andreas\SAMP\gamemodes\E Gate 1.pwn(97) : warning 202: number of arguments does not match definition
C:\my stuff\my games\GTA san nadreas\GTA San Andreas\SAMP\gamemodes\E Gate 1.pwn(9 : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

This is what i did:

Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/opengate", cmdtext, true, 10) == 0)
{
MoveObject(968, 1544.70703125, -1630.7634277344, 13.095315933228, 0, 359.49487304688, 269.87365722656);
return 1;
if(strcmp("/Closegate", true) == 0) //
{
MoveObject(968, 1544.7027587891, -1630.9697265625, 13.145315170288, 0, 269.17498779297, 269.87536621094);
return 1;
}
}
return 0;
}

Reply
#6

Quote:
Originally Posted by [LSR
State_Trooper ]
edited my post, try again
You need to only copy X,Y,Z not the rotations (last 3 coords) see:
Код:
MoveObject(objectid, Float:X, Float:Y, Float:Z, Float:Speed)
https://sampwiki.blast.hk/wiki/MoveObject
Reply
#7

Quote:
Originally Posted by shotyoudie
Quote:
Originally Posted by [LSR
State_Trooper ]
edited my post, try again
You need to only copy X,Y,Z not the rotations (last 3 coords) see:
Код:
MoveObject(objectid, Float:X, Float:Y, Float:Z, Float:Speed)
https://sampwiki.blast.hk/wiki/MoveObject
I Tried that, this is the error:

Quote:

C:\my stuff\my games\GTA san nadreas\GTA San Andreas\SAMP\gamemodes\E Gate 1.pwn(96) : error 001: expected token: ";", but found "return"
C:\my stuff\my games\GTA san nadreas\GTA San Andreas\SAMP\gamemodes\E Gate 1.pwn(96) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

this is the code i wrote in:

Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/OpenGate", cmdtext, true, 10) == 0)
{
MoveObject(968, 1544.70703125, -1630.7634277344, 13.095315933228, 1)
return 1;
}
return 0;
}

i only wrote opening command, to make it easier
Reply
#8



Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/OpenGate", cmdtext, true, 10) == 0)
{
MoveObject(968, 1544.70703125, -1630.7634277344, 13.095315933228, 1);
return 1;
}
return 0;
}

i only wrote opening command, to make it easier


try that
[/quote]
Reply
#9

Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/OpenGate", cmdtext, true, 10) == 0)
{
MoveObject(968, 1544.70703125, -1630.7634277344, 13.095315933228, 1);
return 1;
}
return 0;
}

Try this.
Reply
#10

Quote:
Originally Posted by anumaz
Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/OpenGate", cmdtext, true, 10) == 0)
{
MoveObject(968, 1544.70703125, -1630.7634277344, 13.095315933228, 1);
return 1;
}
return 0;
}

lol, Copy and paste much.. That's EXACTLY what I said.
Try this.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)