PDA

View Full Version : Define in a string.


wouter0100
02/09/2011, 10:53 AM
Hey,

I got an error with the Define at the end.
How can i fix this simple?
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:
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!

[MWR]Blood
02/09/2011, 11:00 AM
"RDD V"VERSION");

Vince
02/09/2011, 11:03 AM
#define VERSION "0.2"

Quotation marks.

Lorenc_
02/09/2011, 11:07 AM
#define VERSION "0.2"

Quotation marks.

That and:

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:


SetVehicleNumberPlate(cars[tellen] = CreateVehicle(Model, pos[0], pos[1], pos[2], pos[3], color[0], color[1], -1), "RDD V"#VERSION"");

wouter0100
02/09/2011, 11:39 AM
Thanks that # and the "0.2" works

Andrew_Yuston
26/06/2014, 08:53 PM
uhm..

MonsterK1ller
14/09/2017, 08:57 AM
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 (c) 1997-2006, ITB CompuPhase


2 Errors.

Kane
14/09/2017, 09:02 AM
You bump a 7 year old thread for help on something that isn't even relevant to OP?

Zeth
14/09/2017, 11:10 AM
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.

OneDay
14/09/2017, 11:13 AM
Use "" or #, not both