26 errors...
#1

pawn Код:
forward OnPlayerStateChange(playerid,newstate,oldstate);
public OnPlayerStateChange(playerid,newstate,oldstate){
{
    if  (newstate==PLAYER_STATE_DRIVER)
        {
            SendClientMessage(playerid,COLOR_GREY,"You entered a vehicle, drive safely!");
            SendClientMessage(playerid,COLOR_GREY,"Type /engine & /lights to switch them on and off.");
        }
    }
    return 1;
    if(newstate == PLAYER_STATE_ONFOOT)
    {
        if(GetPVarInt(playerid,"Lights")>0)
        {
            SetPVarInt(playerid,"Lights",0);
            if(IsValidObject(GetPVarInt(playerid,"Siren1")))
            {
                DestroyObject(GetPVarInt(playerid,"Siren1"));
            }
            if(IsValidObject(GetPVarInt(playerid,"Siren2")))
            {
                DestroyObject(GetPVarInt(playerid,"Siren2"));
            }
        }
    }
    return 1;
}
This gives me 26 errors
Reply
#2

pawn Код:
if  (newstate==PLAYER_STATE_DRIVER)
{
            SendClientMessage(playerid,COLOR_GREY,"You entered a vehicle, drive safely!");
            SendClientMessage(playerid,COLOR_GREY,"Type /engine & /lights to switch them on and off.");
}
return 1;
//rest here
Reply
#3

pawn Код:
forward OnPlayerStateChange(playerid,newstate,oldstate);
public OnPlayerStateChange(playerid,newstate,oldstate){
{
    if  (newstate==PLAYER_STATE_DRIVER)
    {
         SendClientMessage(playerid,COLOR_GREY,"You entered a vehicle, drive safely!");
         SendClientMessage(playerid,COLOR_GREY,"Type /engine & /lights to switch them on and off.");
    }
    return 1;
    if(newstate == PLAYER_STATE_ONFOOT)
    {
        if(GetPVarInt(playerid,"Lights")>0)
        {
            SetPVarInt(playerid,"Lights",0);
            if(IsValidObject(GetPVarInt(playerid,"Siren1")))
            {
                DestroyObject(GetPVarInt(playerid,"Siren1"));
            }
            if(IsValidObject(GetPVarInt(playerid,"Siren2")))
            {
                DestroyObject(GetPVarInt(playerid,"Siren2"));
            }
        }
    }
    return 1;
}
You used a '}' too much in the first lines.

EDIT: Someone was faster, heh.
Reply
#4

Was it necessary to re-post what I just did?
Reply
#5

pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate){
{
    if  (newstate==PLAYER_STATE_DRIVER)
    {
         SendClientMessage(playerid,COLOR_GREY,"You entered a vehicle, drive safely!");
         SendClientMessage(playerid,COLOR_GREY,"Type /engine & /lights to switch them on and off.");
    }
    if(newstate == PLAYER_STATE_ONFOOT)
    {
        if(GetPVarInt(playerid,"Lights")>0)
        {
            SetPVarInt(playerid,"Lights",0);
            if(IsValidObject(GetPVarInt(playerid,"Siren1")))
            {
                DestroyObject(GetPVarInt(playerid,"Siren1"));
            }
            if(IsValidObject(GetPVarInt(playerid,"Siren2")))
            {
                DestroyObject(GetPVarInt(playerid,"Siren2"));
            }
        }
    }
    return 1;
}
Reply
#6

Dude, stop re-posting what already two others did, okay? You just wanna get some un-deserved reputation points while stealing solutions from other people!!
Reply
#7

Quote:
Originally Posted by Twisted_Insane
Посмотреть сообщение
Was it necessary to re-post what I just did?
You posted it at the same time, aswell yours lacks of an explanation an understanding.

Quote:
Originally Posted by Twisted_Insane
Посмотреть сообщение
Dude, stop re-posting what already two others did, okay? You just wanna get some un-deserved reputation points while stealing solutions from other people!!
reputation doesnt grow your dick.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)