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

Solved calling stock "ByteCountToCells" that has no generated code


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Spyrek
Senior Member
Join Date: Jun 2009
Old 08-20-2018 , 05:15   calling stock "ByteCountToCells" that has no generated code
Reply With Quote #1

Hello,
I've got problem compiling plugin. This line:
PHP Code:
ArrayList models = new ArrayList(ByteCountToCells(PLATFORM_MAX_PATH)); 
Causes this error:
PHP Code:
fatal error 195compiler bugcalling stock "ByteCountToCells" that has no generated code 

Last edited by Spyrek; 08-20-2018 at 13:29.
Spyrek is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 08-20-2018 , 05:20   Re: calling stock "ByteCountToCells" that has no generated code
Reply With Quote #2

You cant ByteCountToCells an int can you?
__________________
Neuro Toxin is offline
Spyrek
Senior Member
Join Date: Jun 2009
Old 08-20-2018 , 05:29   Re: calling stock "ByteCountToCells" that has no generated code
Reply With Quote #3

Quote:
Originally Posted by Neuro Toxin View Post
You cant ByteCountToCells an int can you?
https://forums.alliedmods.net/showpo...13&postcount=7
Spyrek is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 08-20-2018 , 07:55   Re: calling stock "ByteCountToCells" that has no generated code
Reply With Quote #4

Quote:
Originally Posted by Neuro Toxin View Post
You cant ByteCountToCells an int can you?
I can't tell if you're being sarcastic or not. ByteCountToCells takes an int and returns another int. You may see it used on a sizeof instead of a bare int, but sizeof is a compiler directive that outputs an int.

Edit: Directive is the wrong word here, but I can't think of the right one. It's too early in the morning to think.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 08-20-2018 at 07:57.
Powerlord is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 08-20-2018 , 08:03   Re: calling stock "ByteCountToCells" that has no generated code
Reply With Quote #5

It's an operator I believe.
__________________
klippy is offline
mug1wara
AlliedModders Donor
Join Date: Jun 2018
Old 08-20-2018 , 08:37   Re: calling stock "ByteCountToCells" that has no generated code
Reply With Quote #6

I highly doubt that's the issue with your code.

Give us a bigger snippet.
mug1wara is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 08-20-2018 , 09:35   Re: calling stock "ByteCountToCells" that has no generated code
Reply With Quote #7

Looks like you are declaring it in the global scope. I'm not exactly sure if this is a bug or not. But, you can declare the variable in the global scope and then set it in OnPluginStart.

Edit: Thinking back I've had a similar issue I believe it ended up not being a bug, but more the error is just confusing.

Last edited by Dr!fter; 08-20-2018 at 09:35.
Dr!fter is offline
Spyrek
Senior Member
Join Date: Jun 2009
Old 08-20-2018 , 13:27   Re: calling stock "ByteCountToCells" that has no generated code
Reply With Quote #8

Quote:
Originally Posted by Dr!fter View Post
Looks like you are declaring it in the global scope. I'm not exactly sure if this is a bug or not. But, you can declare the variable in the global scope and then set it in OnPluginStart.

Edit: Thinking back I've had a similar issue I believe it ended up not being a bug, but more the error is just confusing.
Thanks! It's was used in global scope, after declaring globally and set in OnPluginStart plugin compiles without errors.
Spyrek is offline
Reply


Thread Tools
Display Modes

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 14:46.


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