SA-MP Forums Archive
Help with Define - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help with Define (/showthread.php?tid=157017)



Help with Define - DarkAssassin - 25.06.2010

How would I make it define servername?

Код:
#define servername Garcia
Doesn't work.

Код:
SetGameModeText("%s Roleplay", servername);
I want it to work with this code.


Re: Help with Define - bigcomfycouch - 25.06.2010

Код:
#define servername "Garcia"



Re: Help with Define - DarkAssassin - 25.06.2010

Код:
SetGameModeText("%s Roleplay", servername);
I got an error:

Код:
C:\Users\Owner\Desktop\Blank RP\gamemodes\blankrp.pwn(14) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.



Re: Help with Define - Calgon - 05.07.2010

Код:
new string[128]; // Change size as you please.
format(string, sizeof(string), "%s Roleplay", servername);
SetGameModeText(string);
Remember to format your strings...