Defines - 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: Defines (
/showthread.php?tid=453471)
Defines -
wumpyc - 25.07.2013
I'm trying to make my shit easier by defining stuff..
Code:
#define error SendClientMessage(playerid, COLOR_RED, "You don't have permission to use this command!");
#define notadmin (PlayerInfo[playerid][pLevel] < 1)
Code:
CMD:tppos(playerid, params[])
{
new Float:x, Float:y, Float:z
if notadmin return error //this is line 1203
if (sscanf(params,"fff",x,y,z)) SendClientMessage(playerid, COLOR_RED,"USAGE: /tppos X Y Z");
SetPlayerPos(playerid,x,y,z);
return 1;
}
Code:
C:\Users\Dorian\Desktop\sa-mp\gamemodes\bhaulers.pwn(1203) : error 001: expected token: ";", but found "if"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Re: Defines -
nor15 - 25.07.2013
Remove
PHP Code:
new Float:x, Float:y, Float:z
and put
PHP Code:
new Float:x, Float:y, Float:z;
Re: Defines -
wumpyc - 25.07.2013
Silly me.. Thanks