Sorry if this is spam :(
#1

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(IsPlayerInRangeOfPoint(playerid, 7.0, 1130.7203,-2029.2191,69.0078))
   	if (PRESSED(KEY_FIRE))
    {
   		new name[MAX_PLAYER_NAME], string[44];
   	 	GetPlayerName(playerid, name, sizeof(name));
		format(string, sizeof(string), "Welcome, %s.",name);
        SendClientMessage(playerid,0xFFFFFFFF,string);
    }
	return 1;
}
i have created this command... and its showing 1 error
Код:
C:\Users\sovy\Desktop\Tushar^#$.@(DANGER)\CnRPatrol\samp03csvr_R2-2_win32\gamemodes\HellzoneStuntages.pwn(3249) : error 017: undefined symbol "PRESSED"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#2

No This Isnt Spam Its Asking For Help. I Cant Give You Much Answer For This But I Can Give You Help.

Quote:

The error occurs when a piece of code references a variable, constant or function that the compiler cannot find. Often, this error is encountered by scripters who recklessly copy and paste code from one script to another, not realizing that the code in question depends on other code in the original script. Another, more common mistake made by even the most experienced scripters, is misspelling symbols.
That Means That The Input either Dosnt Exist, Or It Dosnt Belong There
Reply
#3

thankz can anyone fix it and give script?...
thank u BMX
Reply
#4

#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
Reply
#5

Damn beat me to it Cessil...

pawn Код:
// PRESSED(keys)
#define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
This should fix it, if you need help with OnPlayerKeyStateChange https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange
Reply
#6

lol thankz everyone
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)