Raised This Month: $ Target: $400
 0% 

[Solved] Integer parameter passed to stock function


Post New Thread Reply   
 
Thread Tools Display Modes
Boonie
Member
Join Date: Aug 2015
Old 08-17-2015 , 21:52   Re: [Solved] Integer parameter passed to stock function
Reply With Quote #11

Everything which I posted I rewrote after I found out that there was a new syntax, so everything I have is the new syntax, I just didn't feel the need to update the thread.

Quote:
Originally Posted by Potato Uno View Post
Always search the API (https://sm.alliedmods.net/new-api/) to see if there's a function that can do what you want.
I will bookmark that link, very useful. And I can assure you I have written everything in the new syntax.

Quote:
Originally Posted by Benoist3012 View Post
//idk if int is need
When I rewrote it, it compiled fine without the int.

Last edited by Boonie; 08-17-2015 at 22:44.
Boonie is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 08-17-2015 , 22:24   Re: [Solved] Integer parameter passed to stock function
Reply With Quote #12

Quote:
Originally Posted by Boonie View Post
When I rewrote it, it compiled fine without the int.
It compiled file because it used the backwards compat syntax.
EX:
Old:
PHP Code:
new 5
New:
PHP Code:
int i 5
__________________
WildCard65 is offline
Boonie
Member
Join Date: Aug 2015
Old 08-17-2015 , 22:33   Re: [Solved] Integer parameter passed to stock function
Reply With Quote #13

Are you sure you need the int? If I place the int infront of the 0's it errors out.

PHP Code:
CreateZone(view_as<float> { -1150.0, -3635.0, -16.0 }, view_as<float> { -48.0, -128.0, -100.0 }, view_as<float> { 48.0128.0100.0 }, 00)
CreateZone(view_as<float> { -1150.0, -3635.0, -16.0 },  view_as<float> { -48.0, -128.0, -100.0 }, view_as<float> {  48.0128.0100.0 }, int 0int 0// This errors 

Last edited by Boonie; 08-17-2015 at 22:42.
Boonie is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 08-18-2015 , 00:36   Re: [Solved] Integer parameter passed to stock function
Reply With Quote #14

The int only needs to be behind the variable name, not behind fixed values.

Furthermore it only needs to be in the function header, not in a function call.
Potato Uno is offline
Boonie
Member
Join Date: Aug 2015
Old 08-18-2015 , 00:41   Re: [Solved] Integer parameter passed to stock function
Reply With Quote #15

That is what I thought, I thought I was going crazy when he said that you need the int.
Boonie 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 18:50.


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