Jump to content
MakeWebGames

Current V2 Problems (Minor Bugs) Help Required?


chaoswar4u

Recommended Posts

Hi all. I have a few problems in V2 yet to resolve. The problems are listed below.

1) Gangs have the ability to rename there gang to "Blank" nothing so peeps cannot declare war or even click on there gang for details.

2) In the forums people sometimes people forget to place a topic name thus it will there again show a blank box and thus not allowing it to be accessed.

Alittle code input to help resolve this would be great.

Link to comment
Share on other sites

Re: Current V2 Problems (Minor Bugs) Help Required?

You could however do it many ways for example...

 

IF(!$gangname){
Echo "I am empty!";
}

 

Orrrr

 

IF(empty($gangname)){
Echo "I am empty!";
}

 

There are a lot of issues with which is faster, some say that !$gangname would be faster that empty(), but in these instances it would be quicker to use empty()

1. It is needed for arrays and (I think) objects

2. empty() is actually FASTER than using just the variable. You might think that it would be slower because it looks like a function, but it is actually a language construct. Apparently it is optimized. It is at least 10% faster, sometimes nearly 20% faster.

Link to comment
Share on other sites

Re: Current V2 Problems (Minor Bugs) Help Required?

 

There are a lot of issues with which is faster, some say that !$gangname would be faster that empty(), but in these instances it would be quicker to use empty()

1. It is needed for arrays and (I think) objects

2. empty() is actually FASTER than using just the variable. You might think that it would be slower because it looks like a function, but it is actually a language construct. Apparently it is optimized. It is at least 10% faster, sometimes nearly 20% faster.

In this case, does it really matter? We're not using it in a loop, we're using it once - both functions will take virtually no time to execute, so there's little to no point in a 10-20% gain if the time is 0.001s to start with.

To solve your problems, as Hack3rmatt stated, you should check if the input is empty when its posted, and if so stop them creating their gang/changing gang name/posting a topic.

Link to comment
Share on other sites

Re: Current V2 Problems (Minor Bugs) Help Required?

 

In this case, does it really matter? We're not using it in a loop, we're using it once - both functions will take virtually no time to execute, so there's little to no point in a 10-20% gain if the time is 0.001s to start with.

Yes It does matter, I was telling him alternatives and what to use when, so when he does know how to code better and wants to make his own mod which actually has a loop then he will know what to use and what will give him the best performance, so that his code will be efficient and properly coded. Shame this couldn't be said for somethings though...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...