Raised This Month: $32 Target: $400
 8% 

Solved GetClientWeapon Compile Errors


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ravrob
Junior Member
Join Date: Oct 2019
Location: The Ice
Old 11-13-2020 , 05:19   GetClientWeapon Compile Errors
Reply With Quote #1

So I'm trying to use GetClientWeapon except it keeps throwing error 029: invalid expression, assumed zero. I thought I was using this function correctly and I can't seem to find anything different in new or old syntax. I might just be tired for all I know, if anyone knows what I'm doing wrong I would appreciate it if you could point it out for me.

PHP Code:
    char weaponclass[32];
    
GetClientWeapon(clientchar[] weaponclassint sizeof(weaponclass)); 

Last edited by Ravrob; 11-13-2020 at 17:26.
Ravrob is offline
MAGNAT2645
Senior Member
Join Date: Nov 2015
Location: AlliedMods.net
Old 11-13-2020 , 05:50   Re: GetClientWeapon Compile Errors
Reply With Quote #2

Code:
    char weaponclass[32];
    GetClientWeapon(client, weaponclass, sizeof(weaponclass));
You don't need to specify variable type if you're passing it as argument since function prototype already knows required type for every parameter.
__________________

Last edited by MAGNAT2645; 11-13-2020 at 06:44.
MAGNAT2645 is offline
Ravrob
Junior Member
Join Date: Oct 2019
Location: The Ice
Old 11-13-2020 , 17:26   Re: GetClientWeapon Compile Errors
Reply With Quote #3

Ahhh okay I didn't know that. Thanks for pointing that out.
Ravrob is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:33.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode