Raised This Month: $51 Target: $400
 12% 

[INC] String Stocks


Post New Thread Reply   
 
Thread Tools Display Modes
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 08-22-2011 , 21:56   Re: [INC] String Stocks
Reply With Quote #11

Quote:
Originally Posted by Exolent[jNr] View Post
str_substr_count() is for that.
Ah didn't see that.
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
Tirant
Veteran Member
Join Date: Jul 2008
Location: Los Angeles, California
Old 09-07-2011 , 20:56   Re: [INC] String Stocks
Reply With Quote #12

Have you ever thought about creating a string type? They have a string object in Java. I think it would be a pretty cool feature to have. Basically have them make a string, and then have it actually stored as an Array: so it doesn't have a max length. Then you could define operators like

Code:
new String:szMessage = "This is";
szMessage += " a test!";
Code:
new String szMessage1 = "This is";
new String:szMessage2 = " a test!";
server_print(szMessage1 + szMessage2);
I just always thought that was pretty cool idea, especially for beginners who don't really understand the whole concept of how sz arrays work.
__________________

PM me if you're interested in buying the Credits addition for Base Builder
Battlefield Rebirth [66% done]
Call of Duty: MW2 [100% done]
Base Builder [100% done]
Tirant is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 09-07-2011 , 21:27   Re: [INC] String Stocks
Reply With Quote #13

Yea, I like the string object in java a lot more than having to deal with arrays for strings in Pawn. It's easier to use, and like you showed, you can use the += operator to add to strings. Not sure how you would go about making it, but it would be cool if it was made.
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-07-2011 , 21:37   Re: [INC] String Stocks
Reply With Quote #14

More than likely it's not possible without asking the pawn dev team to change it (and even then it won't get into AMX Mod X as it won't get updated).

I'm also assuming that you would sacrifice speed when you try to go with "limitless" string lengths.
__________________
fysiks is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 09-07-2011 , 21:59   Re: [INC] String Stocks
Reply With Quote #15

Quote:
Originally Posted by fysiks View Post
More than likely it's not possible without asking the pawn dev team to change it (and even then it won't get into AMX Mod X as it won't get updated).

I'm also assuming that you would sacrifice speed when you try to go with "limitless" string lengths.
Kill Joy.
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
Tirant
Veteran Member
Join Date: Jul 2008
Location: Los Angeles, California
Old 09-07-2011 , 22:22   Re: [INC] String Stocks
Reply With Quote #16

Quote:
Originally Posted by fysiks View Post
More than likely it's not possible without asking the pawn dev team to change it (and even then it won't get into AMX Mod X as it won't get updated).

I'm also assuming that you would sacrifice speed when you try to go with "limitless" string lengths.
(my tsee key isn't working, (se) is the replacement.)

Well, also you'd have smaller strings. Instead of dedicating 32 cells to a string that only uses 5, then the string size would adjust. I don't think it would be difficult either, since it can be made to act like a sz string when needed. I'll try and report back later.
__________________

PM me if you're interested in buying the Credits addition for Base Builder
Battlefield Rebirth [66% done]
Call of Duty: MW2 [100% done]
Base Builder [100% done]

Last edited by ConnorMcLeod; 09-08-2011 at 01:19. Reason: fixed
Tirant is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-07-2011 , 22:26   Re: [INC] String Stocks
Reply With Quote #17

Quote:
Originally Posted by Tirant View Post
(my tsee key isn't working, (se) is the replacement.)

Well, also you'd have smaller strings. Instead of dedicating 32 cells to a string that only uses 5, then the string si(se)e would adjust. I don't think it would be difficult either, since it can be made to act like a s(se) string when needed. I'll try and report back later.
Sorry, I don't understand the giberish marked in bold. But you have to remember, the more "convenient" you make it, the less computationally efficient it becomes. RAM(emory) is not that much of an issue for such an old game.
__________________

Last edited by fysiks; 09-07-2011 at 22:44. Reason: Fixed a double negative.
fysiks is offline
Old 09-07-2011, 22:52
nikhilgupta345
This message has been deleted by ConnorMcLeod. Reason: ZZ Top
Old 09-08-2011, 00:53
fysiks
This message has been deleted by ConnorMcLeod. Reason: ZZ Top
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 09-08-2011 , 01:58   Re: [INC] String Stocks
Reply With Quote #18

Personally I just made my own "fake" string tag with:
Code:
#define String: _:
So I can easily recognize when strings are being used.

Along with needing the pawn dev team to make the changes, it would also require a lot of reworking AMXX's natives and breaking a lot of backwards compatibility.

And as fysiks pointed out, there isn't that much of a need for it anyway.
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
Tirant
Veteran Member
Join Date: Jul 2008
Location: Los Angeles, California
Old 09-08-2011 , 05:45   Re: [INC] String Stocks
Reply With Quote #19

Quote:
Originally Posted by fysiks View Post
Sorry, I don't understand the giberish marked in bold. But you have to remember, the more "convenient" you make it, the less computationally efficient it becomes. RAM(emory) is not that much of an issue for such an old game.
Sorry about that. My 'z' key was bound to something else and wasn't allowing me to use it.

While it wouldn't be more efficient, it would be more convenient, which is why I suggested it. I might try and make it anyways for fun. Thanks for shooting my idea out of the water .
__________________

PM me if you're interested in buying the Credits addition for Base Builder
Battlefield Rebirth [66% done]
Call of Duty: MW2 [100% done]
Base Builder [100% done]
Tirant is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-08-2011 , 11:47   Re: [INC] String Stocks
Reply With Quote #20

Quote:
Originally Posted by Tirant View Post
Thanks for shooting my idea out of the water .
lol, I'm just making you ask the question, "Is it really worth it?"
__________________
fysiks 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 13:27.


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