SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 23/09/2018, 12:02 PM   #1
skiplovebra
Huge Clucker
 
Join Date: Sep 2015
Posts: 266
Reputation: 0
Default Object Move gate warning 202

Code:
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
	if(newkeys == KEY_FIRE && IsPlayerInRangeOfPoint(playerid,1.5,1340.401855, 1554.684082, 12.430313))
	{
	    if(state1 == 0) { MoveObject(Gate,1400.000000, 1554.684082, 12.430313,1.0,0.000000, 0.000000, 90.000000, 300.00); state1 = 1;
		}
	    else
		{
		MoveObject(Gate,1340.401855, 1554.684082, 12.430313,1.0,0.000000, 0.000000, 90.000000, 300.00); state1 = 0;
		}
	}
	return 1;
}
Warning 202
Code:
if(state1 == 0) { MoveObject(Gate,1400.000000, 1554.684082, 12.430313,1.0,0.000000, 0.000000, 90.000000, 300.00); state1 = 1;
Code:
MoveObject(Gate,1340.401855, 1554.684082, 12.430313,1.0,0.000000, 0.000000, 90.000000, 300.00); state1 = 0;
skiplovebra is offline   Reply With Quote
Old 23/09/2018, 03:21 PM   #2
Florin48
Huge Clucker
 
Join Date: Nov 2015
Location: Romania
Posts: 229
Reputation: 4
Default Re: Object Move gate warning 202

check the function parameters

your function: MoveObject(Gate, 1400.000000, 1554.684082, 12.430313, 1.0, 0.000000, 0.000000, 90.000000, 300.00);
default function: MoveObject(objectid, Float:X, Float:Y, Float:Z, Float:Speed, Float:RotX = -1000.0, Float:RotY = -1000.0, Float:RotZ = -1000.0)

you have 9 and function have 8
__________________
=============================================
=============================================
=============================================
Quote:
If I helped you for a while, do not forget to reward me with a good reputation.
=============================================
=============================================
=============================================
Florin48 is offline   Reply With Quote
Old 23/09/2018, 06:48 PM   #3
TheToretto
Big Clucker
 
TheToretto's Avatar
 
Join Date: Jul 2015
Posts: 72
Reputation: 5
Default Re: Object Move gate warning 202

Replace your existing line with this one:

PHP Code:
MoveObject(Gate1400.0000001554.68408212.4303131.00.00000090.000000300.00); 
TheToretto is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Move a gate Don_Cage Scripting Help 2 25/09/2013 04:04 PM
Move Gate nor15 Scripting Help 9 10/07/2013 01:52 PM
Gate move SA:MP 0.3d Irox34300 Scripting Help 4 22/05/2012 05:15 PM
Can't move the gate [PS]NightborN Scripting Help 4 13/11/2011 01:04 PM
move object wiht command then auto move back slymatt Help Archive 8 25/07/2011 01:27 AM


All times are GMT. The time now is 01:13 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.