Helo with defining
#1

Heyo . I want to define a name tbat id I put it somewhere in the script, that define will show up there..

pawn Код:
#define fac1rank1 Chief of Police
That will not work due to the spacing in the rank.
Reply
#2

pawn Код:
#define fac1rank1 Chief_of_Police
Reply
#3

Or you can add quotes
pawn Код:
#define fac1rank1 "Chief of Police"
Reply
#4

pawn Код:
case 1: rank = "%s", faction1rank1;
                case 2: rank = "%s", faction1rank2;
                case 3: rank = "%s", faction1rank3;
                case 4: rank = "%s", faction1rank4;
                case 5: rank = "%s", faction1rank5;
                case 6: rank = "%s", faction1rank6;
                case 7: rank = "%s", faction1rank7;
                case 8: rank = "%s", faction1rank8;
                case 9: rank = "%s", faction1rank9;
                default: rank = "%s", faction1rankdef;
I have them assigned to this..

pawn Код:
#define faction1name "LSPD"
#define faction1rankdef "Cadet"
#define faction1rank1 "Officer"
#define faction1rank2 "Senior Officer"
#define faction1rank3 "Corporal"
#define faction1rank4 "Sergeant"
#define faction1rank5 "Staff Sergeant"
#define faction1rank6 "Lieutenant"
#define faction1rank7 "Captain"
#define faction1rank8 "Deputy Chief of Police"
#define faction1rank9 "Chief of Police"
These warnings are given in return..
Код:
C:\Users\Randy\Desktop\NB\Madson Gaming (OFFICIAL SERVER)\gamemodes\KG.pwn(52545) : warning 215: expression has no effect
C:\Users\Randy\Desktop\NB\Madson Gaming (OFFICIAL SERVER)\gamemodes\KG.pwn(52546) : warning 215: expression has no effect
C:\Users\Randy\Desktop\NB\Madson Gaming (OFFICIAL SERVER)\gamemodes\KG.pwn(52547) : warning 215: expression has no effect
C:\Users\Randy\Desktop\NB\Madson Gaming (OFFICIAL SERVER)\gamemodes\KG.pwn(52548) : warning 215: expression has no effect
C:\Users\Randy\Desktop\NB\Madson Gaming (OFFICIAL SERVER)\gamemodes\KG.pwn(52549) : warning 215: expression has no effect
C:\Users\Randy\Desktop\NB\Madson Gaming (OFFICIAL SERVER)\gamemodes\KG.pwn(52550) : warning 215: expression has no effect
C:\Users\Randy\Desktop\NB\Madson Gaming (OFFICIAL SERVER)\gamemodes\KG.pwn(52551) : warning 215: expression has no effect
C:\Users\Randy\Desktop\NB\Madson Gaming (OFFICIAL SERVER)\gamemodes\KG.pwn(52552) : warning 215: expression has no effect
C:\Users\Randy\Desktop\NB\Madson Gaming (OFFICIAL SERVER)\gamemodes\KG.pwn(52553) : warning 215: expression has no effect
C:\Users\Randy\Desktop\NB\Madson Gaming (OFFICIAL SERVER)\gamemodes\KG.pwn(52554) : warning 215: expression has no effect
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


10 Warnings.
Rep to anyone that helps.
Reply
#5

wait, it's working now.

edit: fuck, no its not
Reply
#6

You can't format like this and you don't need format in your case.
pawn Код:
case 1: rank = faction1rank1;
                case 2: rank = faction1rank2;
                case 3: rank = faction1rank3;
                case 4: rank = faction1rank4;
                case 5: rank = faction1rank5;
                case 6: rank = faction1rank6;
                case 7: rank = faction1rank7;
                case 8: rank = faction1rank8;
                case 9: rank = faction1rank9;
                default: rank = faction1rankdef;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)