SA-MP Forums Archive
Does this really crash my pawno? - 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: Does this really crash my pawno? (/showthread.php?tid=521400)



Does this really crash my pawno? - Bek_Loking - 23.06.2014

I recently scripted this:
Код:
CMD:parkinglot
{
   new pgate = CreateObject(2933,1717.0000000,1308.0000000,11.5000000,0.0000000,0.0000000,90.0000000);
   new pmoney = GetPlayerMoney
   if(pmoney(playerid, <500)) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to park your car here!")
   if(GetPlayerState(playerid, PLAYER_STATE_ONFOOT)) return SendClientMessage(playerid, COLOR_RED, "You're not in a vehicle!")
   MoveObject(gate, 1717.0000000,1308.0000000,1.5000000, 5);
   return 1;
 }
And when I compile it my pawno just crashes? Does it really have so many errors that it crashes my pawno or?


Re: Does this really crash my pawno? - Juvanii - 23.06.2014

pawn Код:
CMD:parkinglot(playerid, params[])



Re: Does this really crash my pawno? - Bek_Loking - 23.06.2014

i didnt paste that? thats over there :S


Re: Does this really crash my pawno? - Bek_Loking - 23.06.2014

Код:
if(GetPlayerMoney(playerid, <500)) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to park your car here!")
At this line i get these errors
Код:
C:\Users\MARKO\Desktop\Learning\gamemodes\Tutorial.pwn(257) : error 029: invalid expression, assumed zero
C:\Users\MARKO\Desktop\Learning\gamemodes\Tutorial.pwn(257) : warning 215: expression has no effect
C:\Users\MARKO\Desktop\Learning\gamemodes\Tutorial.pwn(257) : error 001: expected token: ";", but found ")"
C:\Users\MARKO\Desktop\Learning\gamemodes\Tutorial.pwn(257) : error 029: invalid expression, assumed zero
C:\Users\MARKO\Desktop\Learning\gamemodes\Tutorial.pwn(257) : fatal error 107: too many error messages on one line



Re: Does this really crash my pawno? - Juvanii - 23.06.2014

pawn Код:
if(GetPlayerMoney(playerid) < 500)) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to park your car here!");



Re: Does this really crash my pawno? - Threshold - 23.06.2014

pawn Код:
CMD:parkinglot
{
   if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to park your car here!")
   if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_RED, "You're not in a vehicle!")
   MoveObject(CreateObject(2933,1717.0000000,1308.0000000,11.5000000,0.0000000,0.0000000,90.0000000), 1717.0000000,1308.0000000,1.5000000, 5);
   return 1;
 }