Define in a string.
#1

Hey,

I got an error with the Define at the end.
How can i fix this simple?
pawn Код:
SetVehicleNumberPlate(cars[tellen] = CreateVehicle(Model, pos[0], pos[1], pos[2], pos[3], color[0], color[1], -1), "RDD V"VERSION);
I have defined VERSION 0.2

And i got the following errors:
Quote:

C:\Users\Administrator\Desktop\DD\gamemodes\RDD.pw n(1189) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Administrator\Desktop\DD\gamemodes\RDD.pw n(1189) : warning 215: expression has no effect
C:\Users\Administrator\Desktop\DD\gamemodes\RDD.pw n(1189) : error 001: expected token: ";", but found ")"
C:\Users\Administrator\Desktop\DD\gamemodes\RDD.pw n(1189) : error 029: invalid expression, assumed zero
C:\Users\Administrator\Desktop\DD\gamemodes\RDD.pw n(1189) : fatal error 107: too many error messages on one line

Thanks!
Reply
#2

pawn Код:
"RDD V"VERSION");
Reply
#3

pawn Код:
#define VERSION "0.2"
Quotation marks.
Reply
#4

Quote:
Originally Posted by Vince
Посмотреть сообщение
pawn Код:
#define VERSION "0.2"
Quotation marks.
That and:
pawn Код:
SetVehicleNumberPlate(cars[tellen] = CreateVehicle(Model, pos[0], pos[1], pos[2], pos[3], color[0], color[1], -1), "RDD V"#VERSION);
Else if that doesn't work:

pawn Код:
SetVehicleNumberPlate(cars[tellen] = CreateVehicle(Model, pos[0], pos[1], pos[2], pos[3], color[0], color[1], -1), "RDD V"#VERSION"");
Reply
#5

Thanks that # and the "0.2" works
Reply
#6

uhm..
Reply
#7

Guys Help Me!!!

Код:
C:\Users\JB Mercado\Desktop\GTA SAMP SERVER\gamemodes\GTTDM.pwn(140) : error 017: undefined symbol "c_y"
C:\Users\JB Mercado\Desktop\GTA SAMP SERVER\gamemodes\GTTDM.pwn(146) : error 017: undefined symbol "c_y"
C:\Users\JB Mercado\Desktop\GTA SAMP SERVER\gamemodes\GTTDM.pwn(2687) : warning 203: symbol is never used: "strtok"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#8

You bump a 7 year old thread for help on something that isn't even relevant to OP?
Reply
#9

Now this thread got bumped 2 times, once in 2014 and now. xD

@MonsterK1ller , you should better post your problems in a new thread with your relevant problems instead of bumping a old thread that isn't relevant to your problem.
Reply
#10

Use "" or #, not both
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)