Coding help! -1 reply

  • 1
  • 2

Please wait...

loda

the dude

50 XP

18th March 2005

0 Uploads

294 Posts

0 Threads

#1 12 years ago

Ok let me start by saying what im planning on doing in the immediate future with my "mod". The mod is called merc mod, it lets server owns customize LOTS more stuff in the jk3 code via cvar cmds. For example, server owners can contorl the speed and damage of bullets, as well as the spread. (ive already got this part 100 percent finished, including .cfg files for each pre-set). This was pretty simple for me, even though im really noob at coding. anyway, what i did was to replace the numbers for each gun setting in g_weapon.c with variables that can be changed via rcon. Now, i tried doing the same in bg_weapon.c and it gave me an error:

C:\Documents and Settings\XXXXX\Desktop\clan mod source\codemp\game\bg_weapons.c(131) : error C2099: initializer is not a constant

it never game me an error like this when i added variables to g_weapon.c, so im really stumped as to what to do next. and ive already created all the extern stuff in the begeining of bg_weapon.c (the same way i did it in g_weapon.c) and i already included all the variables and their defaults in g_main

Please, if anyone is good at coding and wants to help me out here it would be greatly appreciated. Either reply here or my xfire is extremeloda and my MSN is [email]extremeloda@gmail.com[/email] thanks!




loda

the dude

50 XP

18th March 2005

0 Uploads

294 Posts

0 Threads

#2 12 years ago

anyone, anyone?




Zach

50 XP

5th July 2005

0 Uploads

3,271 Posts

0 Threads

#3 12 years ago

We don't really like bumping, and your signature is too big. Resize it to be within 800x160 pixels.

But check like 131 in the code. And tell us what bg_weapon.c is supposed to do?

Oh, and "initializer is not a constant", probably means you can't change whatever value it was that you changed.




loda

the dude

50 XP

18th March 2005

0 Uploads

294 Posts

0 Threads

#4 12 years ago

in bg_weapon.c im trying to make variables out of the firetime values and the other wep values in there. it already worked with the wep values in g_weapon.c so im not sure why its not working in bg_weapon line 131 is

400, // int fireTime; // Amount of time between firings

but thats only because i have like a bunch of lines of extern vmCvar_t stuff inserted at the top.

so anyway i tried replacing the 400 with like "wp_stun_firetime.value" then i did "extern vmCvar_t wp_stun_firetime;" at the top of page, and then included all the stuff in g_main. :\ im very new to coding, this is the first thing ive done.




loda

the dude

50 XP

18th March 2005

0 Uploads

294 Posts

0 Threads

#5 12 years ago

so anyway i tried replacing the 400 with like "wp_stun_firetime.value" then i did "extern vmCvar_t wp_stun_firetime;" at the top of page, and then included all the stuff in g_main. :\ im very new to coding, this is the first thing ive done.




yourmomisluigi

your uncle is mario

50 XP

1st October 2006

0 Uploads

24 Posts

0 Threads

#6 12 years ago

if you ever get that mod finished, tell me where i can find it. wish i could help you but i suck at coding and im not sure how you got this far.




yourmomisluigi

your uncle is mario

50 XP

1st October 2006

0 Uploads

24 Posts

0 Threads

#7 12 years ago

wait have you tryed setting a default to activate if the server doesnt costimize anything?




loda

the dude

50 XP

18th March 2005

0 Uploads

294 Posts

0 Threads

#8 12 years ago

not sure what you mean by "a defult to activate" but it has definatly been working ingame :) i have almost all of the important stuff coded (besides recoil, ill wokr on that after i get this done.) ill let you know about any major updates,, do you have xfire? or msn?




yourmomisluigi

your uncle is mario

50 XP

1st October 2006

0 Uploads

24 Posts

0 Threads

#9 12 years ago

no just email me at [EMAIL="cyberalex5000@yahoo.com"]cyberalex5000@yahoo.com[/EMAIL] that will be really cool thanks




yourmomisluigi

your uncle is mario

50 XP

1st October 2006

0 Uploads

24 Posts

0 Threads

#10 12 years ago

any estimates on when the final will be ready?




  • 1
  • 2