Author Topic: My questions thread  (Read 9661 times)

a neutered male cat can't produce offspring

a neutered male cat can't produce offspring
Snip snip.
But it just changes the cat into a female because I didn't add a variable saying that it was capable of reproduction or not or if it still has it's balls or not.
I suppose that's something Johnny can add if he really wants to get that detailed

I looked into Visolator's advanced mute script, but I couldn't find a way for it to display a message to the client once he/she/it connects to the server.

Code: [Select]
function gameConnection::autoAdminCheck(%this)
{
  displayKittyMessage(%this);
  return parent::autoAdminCheck(%this);
}
%this is the client that connected

Code: [Select]
function gameConnection::autoAdminCheck(%this)
{
  displayKittyMessage(%this);
  return parent::autoAdminCheck(%this);
}
%this is the client that connected

Would I need to do
Function KittyMessage
{
talk("This server is running Catmod, do /AdoptCat to get one.");
}

okay again the function name needs paranthesis () and arguments inside
also you can't capitilized "function"
so it would be
Code: [Select]
function KittyMessage(%client)
{
  messageClient(%client,'',"This server is running Catmod, do /AdoptCat to get one.");
}
« Last Edit: October 20, 2013, 12:55:26 AM by swollow »

Is it me or is that borked


grey represents stuff inbetween ""s

What it is supposed to look like:



I just pressed undo until it became regular
« Last Edit: October 20, 2013, 12:55:15 AM by Johnny Blockhead »

sorry I put two quotes " by accident in the message, rather than copying and pasting code people do for you try to write it on your own so you can learn how to do the stuff and not run into errors others might have made

sorry I put two quotes " by accident in the message, rather than copying and pasting code people do for you try to write it on your own so you can learn how to do the stuff and not run into errors others might have made
I'm not very fluent in coding.


Reviewing code myself, not getting much out of it
maybe its a capitalization error?
« Last Edit: October 20, 2013, 01:06:50 AM by Johnny Blockhead »

I'm not very fluent in coding.
This is a learning process. You should identify that in your text editor the gray means it thought it was a string. Usually this is caused by not correctly closing a quote (such as like accidently escaping a quote or forgetting to escape one).
Learn how to do this, it will save everyones time

As for your error
Torque isn't case sensitive AFAIK so prolly not a capitalization error.
EDIT: Please actually read your code and don't just copy and paste because if you had some understanding of torque, you might've seen that your function was declared inside another function. You need to understand, we're here to help you understand, not to do this for you. You can take what we write, but LEARN from it.
You literally copied his function inside my function. Functions cannot be put in other functions. The correct solution is to take that function out of my function and move it to a package (the reason we're moving it to a package is because GameConnection::AutoAdminCheck is defined by the game and we don't want to overwrite the original function, just provide functionality along side of it)
« Last Edit: October 20, 2013, 01:20:07 AM by DYLANzzz »

This is a learning process. You should identify that in your text editor the gray means it thought it was a string. Usually this is caused by not correctly closing a quote (such as like accidently escaping a quote or forgetting to escape one).
Learn how to do this, it will save everyones time

As for your error
Torque isn't case sensitive AFAIK so prolly not a capitalization error.
EDIT: Please actually read your code and don't just copy and paste because if you had some understanding of torque, you might've seen that your function was declared inside another function. You need to understand, we're here to help you understand, not to do this for you. You can take what we write, but LEARN from it.
You literally copied his function inside my function. Functions cannot be put in other functions. The correct solution is to take that function out of my function and move it to a package (the reason we're moving it to a package is because GameConnection::AutoAdminCheck is defined by the game and we don't want to overwrite the original function, just provide functionality along side of it)

Look at the code....



It isn't inside your function at all

Also as far as just copy/pasting your guy's code

1) I don't plan to ever release this
2) The only use this add-on will ever have is to look back for references for add-ons I will make in the future.
3) Really the only thing I will use this on my server for is testing to see if it works.


IMAGE EDIT: For ambiguity


As for
Also as far as just copy/pasting your guy's code

1) I don't plan to ever release this
2) The only use this add-on will ever have is to look back for references for add-ons I will make in the future.
3) Really the only thing I will use this on my server for is testing to see if it works.
1) The point I was trying to make is that when you copy pasta, you need to LEARN from it, not just take our word or skim it, but do some actual thinking and look at the code, see what it does, see how you can use it, how you can modify it, how it fits in with everything you've already made. If you don't do this, you'll never learn from it and you won't be able to build on the knowledge that you never learned to fix these simple errors and understand how you can start coding more complex things.
2) Well if you're going to use it as a reference, don't you think you should learn from it and do it right the first time?
3) See #2
« Last Edit: October 20, 2013, 01:48:50 AM by DYLANzzz »

this isn't a concern of releasing it, copying and pasting code stops you from learning, you should be typing it out
also if you get a console error, show the whole code not just the error message because 50% of the time the error message isn't displayed where the error actually is

if you want help you should add me on steam or skype, preferably steam
Contact Page