Something is wrong with this code!
#1

Hello I got errors when i insert this code..
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
  if(newstate = PLAYER_STATE_DRIVER || PLAYER_STATE_PASSENGER)
  {
  	if(IsPlayerInChoppa(playerid)



	}
  return 1;
}
How Could i improve it and make it have no errors?
Reply
#2

there is a

){

missing after if(IsPlayerInChoppa(playerid) ?
Reply
#3

pawn Код:
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
Reply
#4

Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
  if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
  {
    if(IsPlayerInChoppa(playerid){
    }

  return 1;
}
try that
Reply
#5

None of them work...
Reply
#6

Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
  if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
  {
    if(IsPlayerInChoppa(playerid))
    {
    }
  }
  return 1;
}
Reply
#7

as andreskkk stated, your missing brackets, then like 4 people post afterward and make the same mistake

Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
  if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
  {
    if(IsPlayerInChoppa(playerid))
    {
     //your code here
    }
  }
  return 1;
}
Notice the if(IsPlayerInChoppa(playerid)) ALL opened Brackets are Closed!
Reply
#8

Thanks so much guys i thought ill never pass!
Reply
#9

Quote:
Originally Posted by Bayler
as andreskkk stated, your missing brackets, then like 4 people post afterward and make the same mistake

Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
  if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
  {
    if(IsPlayerInChoppa(playerid))
    {
     //your code here
    }
  }
  return 1;
}
Notice the if(IsPlayerInChoppa(playerid)) ALL opened Brackets are Closed!
DOH!

although there was more missing

newstate ==
)
{

thats the summary
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)