What Problem im Getting ??? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: What Problem im Getting ??? (
/showthread.php?tid=335910)
What Problem im Getting ??? -
Avi57 - 20.04.2012
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
Re: What Problem im Getting ??? -
RollTi - 20.04.2012
pawn Код:
if( strcmp( cmdtext, "/beacon , true ) == 0 )
to
pawn Код:
if(strcmp(cmdtext, "/beacon", true) == 0)
Re: What Problem im Getting ??? -
Avi57 - 20.04.2012
Quote:
Originally Posted by RollTi
pawn Код:
if( strcmp( cmdtext, "/beacon , true ) == 0 )
to
pawn Код:
if(strcmp(cmdtext, "/beacon", true) == 0)
|
Thx | Repped +1
Re: What Problem im Getting ??? -
[MG]Dimi - 20.04.2012
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))
Re: What Problem im Getting ??? -
Avi57 - 20.04.2012
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 !!!
Re: What Problem im Getting ??? -
varga - 20.04.2012
i fixed it for u but dont forget to rep me
http://pastebin.com/e0cHsQwz
Re: What Problem im Getting ??? -
Avi57 - 20.04.2012
Quote:
Originally Posted by varga
|
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 ------|-------