help me in this code please
#1

i need your help with this coding.
i dont know what is going wrong here.
Код:
if(strcmp("/paytoll",cmdtext,true,8) == 0)
	{   new object[20];
	    new playermoney;
	    playermoney = GetPlayerMoney(playerid);
	    playermoney = playermoney - 100;
		if(IsPlayerInRangeOfPoint(playerid,5,-1399.4360,-814.0004,81.6349))
		{
		    MoveObject(barier_LS_SF1,-1406.76, -810.87, 81.61,2.00, 0.00, 0.00, -86.10);
			format(object,13,"barier_LS_SF1");
			ResetPlayerMoney(playerid);
			GivePlayerMoney(playerid,playermoney);
            SetTimerEx("reset_barier",5000,0,object,-1406.76,-810.87,81.61,0.00,90.00,-86.10);
		}
		if(IsPlayerInRangeOfPoint(playerid,5,-1396.9285,-819.9434,81.4018))
		{
		    MoveObject(barier_LS_SF2,-1389.67, -823.63, 81.16,2.00,0.00, 0.00, 271.66);
		    ResetPlayerMoney(playerid);
		    GivePlayerMoney(playerid,playermoney);
		}
	}
public reset_barier(object[],x,y,z,rotx,roty,rotz)
{
	MoveObject(object,x,y,z,rotx,roty,rotz); //error seen in this line
	return 1;
}
this is the code and also i have forwarded reset_barier
the errors i am seeing are.
Код:
D:\san andreas\server\gamemodes\flixter_rp.pwn(339) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
please help me
Reply
#2

change
Код:
public reset_barier(object[],x,y,z,rotx,roty,rotz)
to
Код:
public reset_barier(object,x,y,z,rotx,roty,rotz)
Reply
#3

@Babul: there's more issues than that...


Your whole SetTimerEx syntax is wrong.

pawn Код:
SetTimerEx("reset_barier",5000,0, "ffffff", -1406.76,-810.87,81.61,0.00,90.00,-86.10);
You don't need to pass objectid because it's global. You also forgot the Float tags:
pawn Код:
public reset_barier(Float:x,Float:y,Float:z,Float:rotx,Float:roty,Float:rotz)
{
    MoveObject(barier_LS_SF1,x,y,z,rotx,roty,rotz);
    return 1;
}
Reply
#4

Quote:
Originally Posted by Babul
Посмотреть сообщение
change
Код:
public reset_barier(object[],x,y,z,rotx,roty,rotz)
to
Код:
public reset_barier(object,x,y,z,rotx,roty,rotz)
that help me successfully compiling the script but
when i type the command "/paytoll" the samp-server.exe file crashes
Reply
#5

Quote:
Originally Posted by Mean
Посмотреть сообщение
@Babul: there's more issues than that...


Your whole SetTimerEx syntax is wrong.

pawn Код:
SetTimerEx("reset_barier",5000,0, "ffffff", -1406.76,-810.87,81.61,0.00,90.00,-86.10);
You don't need to pass objectid because it's global. You also forgot the Float tags:
pawn Код:
public reset_barier(Float:x,Float:y,Float:z,Float:rotx,Float:roty,Float:rotz)
{
    MoveObject(barier_LS_SF1,x,y,z,rotx,roty,rotz);
    return 1;
}
that will only the object barier_LS_SF1 not the other
i want it to be the one that moved before
Reply
#6

Then just replace it with:

pawn Код:
public reset_barier(Float:x,Float:y,Float:z,Float:rotx,Float:roty,Float:rotz)
{
    MoveObject(barier_LS_SF2,x,y,z,rotx,roty,rotz);
    return 1;
}
OR if you want to move both:
pawn Код:
public reset_barier(Float:x,Float:y,Float:z,Float:rotx,Float:roty,Float:rotz)
{
    MoveObject(barier_LS_SF2,x,y,z,rotx,roty,rotz);
    MoveObject(barier_LS_SF1,x,y,z,rotx,roty,rotz);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)