SA-MP Forums Archive
What - 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 (/showthread.php?tid=615811)



What - Micko123 - 27.08.2016

on this line
PHP код:
SendClientMessage(playerid, -1""S_SRVBOJA"** Kuca ** "G_BJELA"Koristenje:(/kuca [ime])"); 
I get these
Код:
C:\Users\Micko\Desktop\BaySide\gamemodes\BS.pwn(4776) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Micko\Desktop\BaySide\gamemodes\BS.pwn(4776) : warning 215: expression has no effect
C:\Users\Micko\Desktop\BaySide\gamemodes\BS.pwn(4776) : error 001: expected token: ";", but found "-string-"
C:\Users\Micko\Desktop\BaySide\gamemodes\BS.pwn(4776) : warning 215: expression has no effect
C:\Users\Micko\Desktop\BaySide\gamemodes\BS.pwn(4776) : error 001: expected token: ";", but found ")"
C:\Users\Micko\Desktop\BaySide\gamemodes\BS.pwn(4776) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Any ideas?


Re: What - Nero_3D - 27.08.2016

should work if S_SRVBOJA and G_BJELA would be strings

show us how you defined S_SRVBOJA and G_BJELA


Re: What - Kwarde - 27.08.2016

No. Use hashtags in front of the defines. That way the pre-compiler will detect those as macro's, right now it does not.
Код:
SendClientMessage(playerid, -1, ""#S_SRVBOJA"** Kuca ** "#G_BJELA"Koristenje:(/kuca [ime])");



Re: What - Stinged - 27.08.2016

Quote:
Originally Posted by Kwarde
Посмотреть сообщение
No. Use hashtags in front of the defines. That way the pre-compiler will detect those as macro's, right now it does not.
Код:
SendClientMessage(playerid, -1, ""#S_SRVBOJA"** Kuca ** "#G_BJELA"Koristenje:(/kuca [ime])");
If they are defined like this:
pawn Код:
#define COLOR {RRGGBB}
Then yes, a pound sign would be needed.

But it's not when they are defined like this:
pawn Код:
#define COLOR "{RRGGBB}"



Re: What - Kwarde - 27.08.2016

I see. How does that come?


Re: What - Nero_3D - 27.08.2016

Because the hashtag converts text into a string #Hello would be "Hello"
Although I should note that this is done by the precompiler
Doing #variable would result in "variable"


Re: What - Kwarde - 28.08.2016

OH YES OF COURSE! I knew that actually now that you say it :P. Thanks for the heads up (first time in a few years I am into samp&&pawn again)