[Help] How to Fix This??
#1

I got an error in my script and can help me to fix it??

MY SCRIPT
Код:
//-----------[barrel trap]----------------//
	if (newkeys == KEY_FIRE)
	{
		if(IsPlayerInAnyVehicle(playerid))
		{
			new
				Float:x,
				Float:y,
				Float:z;
			{
		  	  if(GetPlayerMoney(playerid) >= 2000)
 	 			{
            		GetPlayerPos(playerid, x, y, z);
					CreateObject(1225,x,y,z, 0.00, 0.00, 0.00);
					GivePlayerMoney(playerid, -2000);
				}
   				else
				{
					SendClientMessage(playerid,purple,"You Dont Have Enough Money");
				}
			}
			else
			{
			SendClientMessage(playerid,purple,"You Must Be in Vehicle To Drop The Trap!");
			}
		}
		return 1;
	}
ERROR
Код:
C:\DOCUME~1\xp\Desktop\LZGSMI~1\GAMEMO~1\GM1.pwn(852) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
Please Help me
Reply
#2

You create x, y, z in lowercase but are creating the object using uppercase X, Y, Z.
Reply
#3

and how to fix this error
C:\DOCUME~1\xp\Desktop\LZGSMI~1\GAMEMO~1\GM1.pwn(8 52) : error 029: invalid expression, assumed zero
Reply
#4

PAWN is CaSe SeNsItIvE.

Edit: Your code is not properly aligned on blocks.
Reply
#5

I have one more question
how to give time limit to this system
so players have to wait a minute longer to use this system again
Reply
#6

Quote:
Originally Posted by dickyodie
Посмотреть сообщение
I have one more question
how to give time limit to this system
so players have to wait a minute longer to use this system again
use SetTimer.
Reply
#7

Don't use set timer... use GetTickCount.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)