What's new

Solved Does the C++ operator "+=" work for MW2?

  • Thread starter nagshay1818
  • Start date
  • Views 499
Status
Not open for further replies.
N

nagshay1818

Enthusiast
Messages
65
Reaction score
4
I'm working on a patch and I'm trying to use the += operator from C++ in it, but I keep getting unknown function errors. Can anyone confirm if the function works in MW2 so I can eliminate that from the problem search.

i += 1 //equivalent to i = i+1
 
E

Ells

#yoloswag
VIP
Retired
Messages
7,756
Reaction score
3,121
I've seen it in the 11th/de-prestige patches floating about on the net, so I'd imagine so yes.
 
C

cj022

i iz so 1338
Messages
1,416
Reaction score
203
That should work, and if it didn't, I don't believe you would get unknown function. You would probably get bad token or a basic syntax error.
 
B

BigWalrus

Enthusiast
Messages
2,001
Reaction score
880
yea its something else in your patch. has nothing to do with the operator. that would give a syntax error if its wrong.
 
N

nagshay1818

Enthusiast
Messages
65
Reaction score
4
Thanks guys

Also, does the "int" function work to initialize data.

Sorry for all the questions. I know C++ fairly well, but just getting my foot into programming MW2.


EDIT: Figured it out how to initialize. I'll have a unique patch coming in a few days.
 
Status
Not open for further replies.
Top Bottom