What Problem im Getting ???
#1

Guys here is the Script and im getting an error on Line 44.
You can see Here:
Код:
#include <a_samp>

public OnPlayerCommandText( playerid, cmdtext[ ] )
{
	if( strcmp( cmdtext, "/work", true ) == 0 )
	{
		if( GetVehicleModel( GetPlayerVehicleID( playerid ) ) != 519 &&
			GetVehicleModel( GetPlayerVehicleID( playerid ) ) != 592 &&
			GetVehicleModel( GetPlayerVehicleID( playerid ) ) != 577 )
				return SendClientMessage( playerid, 0xFFFFFFFF, "Yor Need to be In A Vehicle to Do work!" );

		SetPlayerCheckpoint( playerid, 1644.4673, -2416.9844, 13.5547, 5.0 );
		return 1;
	}

	if( strcmp( cmdtext, "/stopwork", true ) == 0 )
	{
		if(GetPlayerMoney(playerid) >= 1000)
		{
			DisablePlayerCheckpoint( playerid );
			SendClientMessage(playerid,0xFFFFFFFFF,"You Have Canceled the Work!");
		}
		else
		{
			SendClientMessage(playerid,0xFFFFFFFFF,"You Need $1000 to Cancel the Work!");
		}
		return 1;
	}
	
    if( strcmp( cmdtext, "/beacon , true ) == 0 )
    {
        if(IsPlayerInVehicle(playerid, 0))
        {
            SendClientMessage(playerid,0xFFFFFFFFF,"You Need to be in vehicle !");
        }
        else
		{
            SetPlayerColor(playerid, 0xFFFF00FF);
        }
        return 1;
	}
	return 0;
}

public OnPlayerEnterCheckpoint( playerid )
{
	GivePlayerMoney( playerid, 10000 );
	DisablePlayerCheckpoint( playerid );
	return 1;
}
Error:
Код:
C:\Documents and Settings\User\Desktop\server\filterscripts\work.pwn(30) : error 037: invalid string (possibly non-terminated string)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
the Bold one is the line starting from 30 !! If anyone can Help me i will give +1 !!
Thanks
Reply
#2

pawn Код:
if( strcmp( cmdtext, "/beacon , true ) == 0 )
to

pawn Код:
if(strcmp(cmdtext, "/beacon", true) == 0)
Reply
#3

Quote:
Originally Posted by RollTi
Посмотреть сообщение
pawn Код:
if( strcmp( cmdtext, "/beacon , true ) == 0 )
to

pawn Код:
if(strcmp(cmdtext, "/beacon", true) == 0)
Thx | Repped +1
Reply
#4

Yes as RollTi said you need to add "

I also noticed one thing:
pawn Код:
if(IsPlayerInVehicle(playerid, 0))
From message you want to sent to player if this is true you wanted to check is he in any vehicle. Well this won't work. This will check is he in vehicle ID 0. What you need is
pawn Код:
if(!IsPlayerInAnyVehicle(playerid))
Reply
#5

Quote:
Originally Posted by [MG]Dimi
Посмотреть сообщение
Yes as RollTi said you need to add "

I also noticed one thing:
pawn Код:
if(IsPlayerInVehicle(playerid, 0))
From message you want to sent to player if this is true you wanted to check is he in any vehicle. Well this won't work. This will check is he in vehicle ID 0. What you need is
pawn Код:
if(!IsPlayerInAnyVehicle(playerid))
Still Not working !!!
Reply
#6

i fixed it for u but dont forget to rep me http://pastebin.com/e0cHsQwz
Reply
#7

Quote:
Originally Posted by varga
Посмотреть сообщение
i fixed it for u but dont forget to rep me http://pastebin.com/e0cHsQwz
No Thx Its ALready Fixed. But if u want REP+1 Just Go here:https://sampforum.blast.hk/showthread.php?tid=335936

I Sure i will REP U !!
Thanks


TOPIC CLOSED ------|-------
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)