Jump to content
MakeWebGames

ATTEMPT/Please no judging-I ASKED FOR NO JUDGING ME<NO CRITISIZING EITHER


Dustin Rohel

Recommended Posts

I have tried making a fight by mixing some of the userlist from mccodes and the attack in grpg, very first time trying somthing like this. Please let me know if i did a bad thing or not.

People here dont think im actually trying, but i am thanks. I've been editing and trying by TRIAL AND ERROR as someone on MWG told me to do, this person is also not like others that call me dumb and make fun of me for learning slowly, so.... if you wanna say im not trying, then Piss off cuz i have been, i ask questions so i can learn, thanks for making me feel dumb again people...
 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Edited by Dustin Rohel
PEOPLE JUDGING
  • Like 1
  • Haha 1
Link to comment
Share on other sites

12 hours ago, Magictallguy said:

A couple of syntax issues (parsing) and a small miscount for table headings/rows, but you're on the right path 🙂

Thanks, i'm gunna look up what syntax (parsing) is.
Also, what happend to the text i posted, its now able to be copied?

Any pointers on how i can fix this?

Link to comment
Share on other sites

What MTG was trying to say about your parse error is that you are using a double quote to start a string and using another double quote in that same string. You need to mix and match your quotes.

Whatever quote type you use to start a string, that same quote type will end the string. I am on my phone so I can’t do code tags (or I don’t know how), but take a look at the following:

echo “<td class=“contentHead”>Something</td>”;

That will throw an error. Your “contentHead” should be wrapped in a single quote instead of a double quote. 

  • Like 1
Link to comment
Share on other sites

4 minutes ago, KyleMassacre said:

What MTG was trying to say about your parse error is that you are using a double quote to start a string and using another double quote in that same string. You need to mix and match your quotes.

Whatever quote type you use to start a string, that same quote type will end the string. I am on my phone so I can’t do code tags (or I don’t know how), but take a look at the following:

echo “<td class=“contentHead”>Something</td>”;

That will throw an error. Your “contentHead” should be wrapped in a single quote instead of a double quote. 

So i should take echo “<td class=“contentHead”>Something</td>”;

that out of the file, i need to look up what a string is now.

  • Haha 1
Link to comment
Share on other sites

8 minutes ago, Dustin Rohel said:

So i should take echo “<td class=“contentHead”>Something</td>”;

that out of the file, i need to look up what a string is now.

Look at the code specifically where you use echo. Some of it uses " and other parts ' you need to pick one.

Link to comment
Share on other sites

Your second attempt is much closer! 😄
I've edited your post to wrap your code in code
tags, with PHP selected as the language. Not only does this make the post look a little cleaner, it's less abuse on my scrollwheel 😛

Now it has "syntax highlighting
", which changes the colour of the text, visually breaking things up a little in an attempt to make it easier to follow.
Lets take the first line after the opening PHP tag -- this bit:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

It uses 3 colours: White to denote a function (or variable (see further down your code)), off-yellow to show special characters, and green to show a string.
Syntactically, this is correct. Assuming there is a file named "globals.php" in the same directory (folder) as whatever file's running this, it will parse (see this StackOverflow answer for multiple explanations on what "parsing" is).

So, strings are green. Noted.
See the example snippet @corruptcity || skalman just posted? Notice how variables are green and some of the strings are white? Eek! Something's wrong here! The colours have flipped - perhaps a string has been closed before it should've been. It's easy to mix up " (quotation mark) and '' (double apostrophe) 😉

Example snippets from your code:

  

7 hours ago, Dustin Rohel said:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

That's absolutely correct! The function (I use the term loosely as echo is not a function but a language construct.) is white and the string is green. That should run fine.

  

7 hours ago, Dustin Rohel said:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

It starts fine, but wait! The string becomes white, yellow and blue. Somewhere here's one of your problems. 😉
You're also going to run into an additional "gotcha!" too with this one; variables within strings encased in ' (apostrophe) won't parse and will print as plain text. You'll need to break it out of the string and concatenate it instead.

At the risk of a temporary topic change; I strongly recommend using an IDE, preferably tailored the languages you intend to write. Personally, I use solutions from the JetBrains Toolbox as I have full access to everything the toolbox provides at (thankfully) no cost to me.  However, it is payware under the usual circumstances. Notepad++ (albeit not actually an IDE, but can become one) is great for quick 30-second edits and VSCode is a highly-extensive free alternative to the JetBrains products I use.

Final note: Keep at it. You're getting there 🙂

  • Like 1
Link to comment
Share on other sites

There is multiple issues within the echo's the above being one of them

If you are using a echo starting with a " or ' you can then not use these within HTML either as this will also cause a syntax error

Within the snippet @corruptcity || skalman showed you take a close look at the beginning of the echo as you have a issue and then your 'style' within your span 

Edited by AdamHull
Link to comment
Share on other sites

15 hours ago, Magictallguy said:

Your second attempt is much closer! 😄
I've edited your post to wrap your code in code
tags, with PHP selected as the language. Not only does this make the post look a little cleaner, it's less abuse on my scrollwheel 😛

Now it has "syntax highlighting
", which changes the colour of the text, visually breaking things up a little in an attempt to make it easier to follow.
Lets take the first line after the opening PHP tag -- this bit:

require_once('globals.php');

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

It uses 3 colours: White to denote a function (or variable (see further down your code)), off-yellow to show special characters, and green to show a string.
Syntactically, this is correct. Assuming there is a file named "globals.php" in the same directory (folder) as whatever file's running this, it will parse (see this StackOverflow answer for multiple explanations on what "parsing" is).

So, strings are green. Noted.
See the example snippet @corruptcity || skalman just posted? Notice how variables are green and some of the strings are white? Eek! Something's wrong here! The colours have flipped - perhaps a string has been closed before it should've been. It's easy to mix up " (quotation mark) and '' (double apostrophe) 😉

Example snippets from your code:

  

That's absolutely correct! The function (I use the term loosely as echo is not a function but a language construct.) is white and the string is green. That should run fine.

  

It starts fine, but wait! The string becomes white, yellow and blue. Somewhere here's one of your problems. 😉
You're also going to run into an additional "gotcha!" too with this one; variables within strings encased in ' (apostrophe) won't parse and will print as plain text. You'll need to break it out of the string and concatenate it instead.

At the risk of a temporary topic change; I strongly recommend using an IDE, preferably tailored the languages you intend to write. Personally, I use solutions from the JetBrains Toolbox as I have full access to everything the toolbox provides at (thankfully) no cost to me.  However, it is payware under the usual circumstances. Notepad++ (albeit not actually an IDE, but can become one) is great for quick 30-second edits and VSCode is a highly-extensive free alternative to the JetBrains products I use.

Final note: Keep at it. You're getting there 🙂

Thanks! I've been using my note pad to edit 

15 hours ago, corruptcity || skalman said:

I think @KyleMassacre was referring to this

echo '' <tr> <td>' . $r['userid'] . '</td> <td><a href="viewuser.php?u=' . $r['userid'] . '">' . $r['gangPREF'] . ' ' . $r['username'] . '</a></td> <td>' . $r['level'] . '</td> <td>' . (($r['laston'] >= $_SERVER['REQUEST_TIME'] - 15 * 60) ? '<span style='color: green; font-weight:bold;'>Online</span>' : '<span style='color: red; font-weight:bold;'>Offline</span>') . ' </td> </tr> ';

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

I don't know what I'm looking for

Link to comment
Share on other sites

On 7/30/2023 at 2:17 AM, Dustin Rohel said:

Thanks! I've been using my note pad to edit 

I don't know what I'm looking for

You also don't come across as trying much yourself either, so I'll be the one to say it - if you are never going to put one foot forward and look at researching stuff yourself, but just ask on forums constantly, you'll never learn.

At some point, you need to take the driving seat of your own knowledge, so let's drive.

You don't know what you're looking for? Sweet, so what do you THINK you're looking for? What have you taken from anyone's suggestions here?

Link to comment
Share on other sites

  • Dustin Rohel changed the title to ATTEMPT/Please no judging-I ASKED FOR NO JUDGING ME<NO CRITISIZING EITHER
2 hours ago, Dustin Rohel said:

did nobody learn from asking questions? that means the internet too. Why do people just try to put others down?

I don't think SRB is trying to put you down. But rather try to help you see that instead of having all the answers handed to you, without you actually learning anything, you should try to do some research and learn and then ask questions when you get stuck. If you're always asking others to do stuff for you, then you're not going to learn. You'll just make a small attempt and then get others to fix stuff instead of learning to see where your errors are yourself.

  • Like 1
Link to comment
Share on other sites

5 hours ago, Dustin Rohel said:

did nobody learn from asking questions?

About that..

 

On 7/29/2023 at 2:33 AM, KyleMassacre said:

What do you mean exactly?

On 7/29/2023 at 11:10 AM, Magictallguy said:

See the example snippet @corruptcity || skalman just posted?

On 7/29/2023 at 11:10 AM, Magictallguy said:

Notice how variables are green and some of the strings are white?

 

7 hours ago, SRB said:

You don't know what you're looking for?

7 hours ago, SRB said:

so what do you THINK you're looking for?

7 hours ago, SRB said:

What have you taken from anyone's suggestions here?

 

 

It's an interesting choice to throw your toys out of the pram about asking questions while on a forum absolutely full of them.
Advise re-reading this topic. The answers are here 😉

  • Like 1
Link to comment
Share on other sites

5 hours ago, Dustin Rohel said:

did nobody learn from asking questions? that means the internet too. Why do people just try to put others down?

I mean yeah but most people google the error  and figure it from there instead of flooding a forum. Another thing is you come off rude to those that try to help. For example your new edit title…. If you don’t want any criticism, why df are you posting it? Are you teaching us something? I been watching your threads for a hot sec and notice you think this community owe you something. You put 0 to no effort in. I realize that off your domain issue the answer was literally a direct google with MULTIPLE options. All these developers that are trying to guide you should get respect and if you’re nice enough they might give you their contact for further guidance down the road but all your doing is burning bridges and being toxic about things cause you can’t LISTEN. 

  • Like 1
Link to comment
Share on other sites

I think what anybody reading this now or in the future needs to understand is that this is a forum written in text. Things can be taken out of context because it’s difficult to parse what people are really trying to convey since there is not a lot of tone in text.

Everyone here is trying to help but we want you to learn but it’s difficult to teach when your homework is done for you. The answers to your initial problem have been solved and we can work on the next problem if one does arise but we won’t know until you fix what was suggested. Servers only throw one error at a time if the error stops code execution since it can’t move past that and generally syntax errors stop code execution.

Also, laying into people that are here trying to help will not get you the help you need or want and may steer people away from a post when they see your name as the OP because we may just think that you’re not going to take the help we offer unless we write the script for you especially if it’s one of the easiest things to fix such as a syntax error because you are missing a punctuation mark somewhere in your code or you used the incorrect punctuation mark.

  • Like 1
Link to comment
Share on other sites

8 hours ago, Dustin Rohel said:

did nobody learn from asking questions? that means the internet too. Why do people just try to put others down?

A lot of people learned from asking questions on these forums - myself included. Some of us also, me included, then went on to grow up and do software development roles as a living, so yes, people sure so learn a lot from asking questions.

6 hours ago, Veramys said:

I don't think SRB is trying to put you down. But rather try to help you see that instead of having all the answers handed to you, without you actually learning anything, you should try to do some research and learn and then ask questions when you get stuck. If you're always asking others to do stuff for you, then you're not going to learn. You'll just make a small attempt and then get others to fix stuff instead of learning to see where your errors are yourself.

This summed it up exactly.

It wasn't an attack on you or anything, but the simple fact is that you won't ever be successful in the field if you never learn to research yourself. Most developers aren't super intelligent like some people like to believe - we just have an understanding of the syntax and can roughly name most functions. If anyone ever tells you, even after writing PHP for 15+ years, that they know which order all array functions are in - they are lying, and they refer to the manual/documentation.

If you can't accept that comment without being annoyed, this probably isn't the right hobby for you because once you put something public, on forums to Git Hub, people will be reviewing it and judging it, regardless of your thread title.

 

Link to comment
Share on other sites

2 hours ago, SRB said:

A lot of people learned from asking questions on these forums - myself included. Some of us also, me included, then went on to grow up and do software development roles as a living, so yes, people sure so learn a lot from asking questions.

This summed it up exactly.

It wasn't an attack on you or anything, but the simple fact is that you won't ever be successful in the field if you never learn to research yourself. Most developers aren't super intelligent like some people like to believe - we just have an understanding of the syntax and can roughly name most functions. If anyone ever tells you, even after writing PHP for 15+ years, that they know which order all array functions are in - they are lying, and they refer to the manual/documentation.

If you can't accept that comment without being annoyed, this probably isn't the right hobby for you because once you put something public, on forums to Git Hub, people will be reviewing it and judging it, regardless of your thread title.

 

I feel like im being hated on about learning, iv'e stated i have a learning disability and am a slow learner and people still making comments about me not trying, I AM TRYING, i ask lots of questions to find answers and learn, so please.... if you don't like my questions- don't comment on them.

Thanks!

4 hours ago, newttster said:

Dustin ... you said you were using Notepad. Are you using regular Notepad or Notepad++?

I'm using Regular Notepad.

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...