Post: Dvar help!
02-20-2017, 03:52 AM #1
xTrevdizzle
Save Point
(adsbygoogle = window.adsbygoogle || []).push({}); Hi, currently working on a project for mw3, and I have run into an issue using Dvars.

I'm using this code,
            328    void SetDvar(int client, char* Dvar)	
329 {
330 char buf[100];
331 Com_sprintf(buf, 100, "q \"%s%s", Dvar, "\"");
332 SendServerCommand(client, buf);
333 }


and getting this error:
    
1. error 1628: argument of type "char *" is incompatible with parameter (2) of type "int" C:\Users\admin\Documents\Visual Studio 2010\Projects\MW3\menu.cpp line 332

2. error 166: too few arguments in function call C:\Users\admin\Documents\Visual Studio 2010\Projects\MW3\menu\prx.cpp line 332


Anyone know how to fix this?

Thank you in advance!
03-31-2017, 06:19 PM #2
Originally posted by xTrevdizzle View Post
Hi, currently working on a project for mw3, and I have run into an issue using Dvars.

I'm using this code,
            328    void SetDvar(int client, char* Dvar)	
329 {
330 char buf[100];
331 Com_sprintf(buf, 100, "q \"%s%s", Dvar, "\"");
332 SendServerCommand(client, buf);
333 }


and getting this error:
    
1. error 1628: argument of type "char *" is incompatible with parameter (2) of type "int" C:\Users\admin\Documents\Visual Studio 2010\Projects\MW3\menu.cpp line 332

2. error 166: too few arguments in function call C:\Users\admin\Documents\Visual Studio 2010\Projects\MW3\menu\prx.cpp line 332


Anyone know how to fix this?

Thank you in advance!


Did you figure this out yet ?

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo