Help, Im sure this is a bug
#1

Код:
public OnPlayerEnterVehicle(playerid)
{
SetTimer("enter",5000,false);
return 1;
}

public OnPlayerExitVehicle(playerid)
{
SetTimer("exit",5000,false);
return 1;
}

public exit(playerid)
{
TextDrawHideForPlayer(playerid,Textdraw1);
}

public enter(playerid)
{
	TextDrawShowForPlayer(playerid,Textdraw1);
}
returns errors===
//////////////////
: error 010: invalid function or declaration
C:\Users\Braduz\Desktop\Server\filterscripts\Stats .pwn(86) : error 001: expected token: "-identifier-", but found "exit"
C:\Users\Braduz\Desktop\Server\filterscripts\Stats .pwn(91) : error 025: function heading differs from prototype
Reply
#2

which lines are have the error, and also take a look at your callbacks and make sure that the heading is the same on both the callback and the forward

ex:
forward enter(playerid,interiorid)
public enter(playerid) //<-- Not the same as above
Reply
#3

You maybe setted the timer twice?
Reply
#4

Try this
Код:
public OnPlayerEnterVehicle(playerid);
{
SetTimer("enter",5000,false);
return 1;
}

public OnPlayerExitVehicle(playerid);
{
SetTimer("exit",5000,false);
return 1;
}

public exit(playerid);
{
TextDrawHideForPlayer(playerid,Textdraw1);
}

public enter(playerid);
{
	TextDrawShowForPlayer(playerid,Textdraw1);
}
Reply
#5

OnPlayerEnterVehicle & OnPlayerExitVehicle callbacks have more than one parameter, check the wiki to learn more. Also, use SetTimerEx in this case if you want your script to work properly.
Reply
#6

Note: Use SetTimerEx because when someone get in the vehicle and another one to and leaves it it will getting bugged.
Reply
#7

Quote:
Originally Posted by Don Correlli
OnPlayerEnterVehicle & OnPlayerExitVehicle callbacks have more than one parameter, check the wiki to learn more. Also, use SetTimerEx in this case if you want your script to work properly.
According to wiki it has one :/
and the other code that person gave me give me 8 errors
Reply
#8

Quote:
Originally Posted by braduz
According to wiki it has one :/
No, it doesn't.

https://sampwiki.blast.hk/wiki/OnPlayerEnterVehicle - params: playerid, vehicleid, ispassenger
https://sampwiki.blast.hk/wiki/OnPlayerExitVehicle - params: playerid, vehicleid
Reply
#9

Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by braduz
According to wiki it has one :/
No, it doesn't.

https://sampwiki.blast.hk/wiki/OnPlayerEnterVehicle - params: playerid, vehicleid, ispassenger
https://sampwiki.blast.hk/wiki/OnPlayerExitVehicle - params: playerid, vehicleid
nvm, onplayerenter/exitvehicle is shitty and glitchy anyway
nvm
Reply
#10

Quote:
Originally Posted by braduz
nvm, onplayerenter/exitvehicle is shitty and glitchy anyway
nvm
No, it works just like it's meant to.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)