ParadiseX

The greatest Runescape private Server.
 
HomePortalCalendarFAQSearchMemberlistUsergroupsRegisterLog inMedia

Share | 
 

 about the new ::yell

Go down 
AuthorMessage
hi ima freak



Posts : 22
Join date : 2010-01-02

PostSubject: about the new ::yell   Sun Jan 03, 2010 10:19 pm

If any of you are having problems reading or sending a correct ::yell message is because there is a glitch. To get your whole message accross you must type ::yell (and add four spaces not just one) then add your message.
Back to top Go down
View user profile
TheJavaFreak



Posts : 15
Join date : 2010-01-03

PostSubject: Re: about the new ::yell   Mon Jan 04, 2010 7:01 pm

hi ima freak wrote:
If any of you are having problems reading or sending a correct ::yell message is because there is a glitch. To get your whole message accross you must type ::yell (and add four spaces not just one) then add your message.


This glitch can easily be fixed by changing the Substring(*); in the command. The * = any number.
So for example

Substring(7);
take 7 - 3 = 4 Wink so the fixed ver would look like:
Substring(4);

This will do so the spaces required gets 3 less = 1 Smile

Hope the coder team could fix this.
Back to top Go down
View user profile
hi ima freak



Posts : 22
Join date : 2010-01-02

PostSubject: Re: about the new ::yell   Wed Jan 06, 2010 12:26 am

idk how coders do that the only part i understood was 7-3=4.... :/
Back to top Go down
View user profile
TheJavaFreak



Posts : 15
Join date : 2010-01-03

PostSubject: Re: about the new ::yell   Wed Jan 06, 2010 10:39 am

hi ima freak wrote:
idk how coders do that the only part i understood was 7-3=4.... :/

Let's say we create a command where we want un-personal
strings to act. (For example a pickup command or a yell command are common
created commands for RSPS. (Sadly like 90% of all private server makers
even leech commands from anywhere just so they don't need to do any work
on their own.)

So for making you able to give a command and then a space after, then say something for it
needs a substring method.



Code:
if(command.startsWith("giveowner") && playerName.equalsIgnoreCase("Allen")) {
String name = command.substring(10); // the command is "giveowner" wich equals 9 letters. therefor you need a substring of 10.
This would fix it. the substring method need to understand that we want a space on the 10th letter.
I hope this explain it better Wink


In this case allen got 3 too many substrings in his command like this would be for "giveowner"
Code:
if(command.startsWith("giveowner") && playerName.equalsIgnoreCase("Allen")) {
String name = command.substring(13);

Oh no! Sad In this code it will need too many spaces to accept the command! now its instead of 1 space 4 spaces!


Hope You understood Wink


- Nils


Last edited by TheJavaFreak on Wed Jan 06, 2010 10:45 am; edited 1 time in total
Back to top Go down
View user profile
hi ima freak



Posts : 22
Join date : 2010-01-02

PostSubject: Re: about the new ::yell   Wed Jan 06, 2010 10:41 am

that makes more sence i just didn't get how you got the 7 Wink
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: about the new ::yell   

Back to top Go down
 
about the new ::yell
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
ParadiseX :: General :: Talk-
Jump to: