How to convert "const String:var[]" to new syntax
Just started using smlib, following function:
Code:
stock Client_HasWeapon(client, const String:className[]) Code:
public bool has_weapon(const char[] weapon) { |
Re: How to convert "const String:var[]" to new syntax
const char[] className should work fine unless you have a mistake some where else in the code that you're not posting.
|
Re: How to convert "const String:var[]" to new syntax
What's the declaration of "that"
|
Re: How to convert "const String:var[]" to new syntax
Code:
return Client_HasWeapon(view_as<int>(that), weapon); |
Re: How to convert "const String:var[]" to new syntax
they're* asking what is that is that being initialized to
|
Re: How to convert "const String:var[]" to new syntax
Quote:
WildCard65's advice would make OP realize that that is in fact not an int therefore throw a "tag mismatch" warning, and mine was to reference to that as in int. |
Re: How to convert "const String:var[]" to new syntax
Quote:
|
Re: How to convert "const String:var[]" to new syntax
Looks like smlib's function isn't returning a bool while your method is.
|
Re: How to convert "const String:var[]" to new syntax
Quote:
https://github.com/bcserv/smlib/blob...ents.inc#L1358 |
Re: How to convert "const String:var[]" to new syntax
For reference, I had the following code:
Code:
#define that view_as<int>(this) |
All times are GMT -4. The time now is 07:31. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.