Author Topic: Basic command script...  (Read 2882 times)

You said proper syntax, not standard format
The reason it's the industry standard is because it's considered the proper syntax, otherwise you'd have people formatting like this:
Code: [Select]
function rape(
%arg1,
%arg2,
%arg3
)
{
if(
%arg1
==
%arg2
)
{
return 1;
}
if(
%arg2
==
%arg3
)
{
return 2;
}
if(
%arg3
==
%arg1
)
{
return 3;
}
return 4;
}
« Last Edit: September 10, 2012, 12:23:41 AM by TripNick »

i read that first because i thought

...... i thought it might be useful







then i realized my error :(

Formatting != syntax.  Nick, what you just showed would be rejected anywhere because it's unreadable, but it would still compile (assuming the compiler ignores whitespace).

Unfortunately, the OP's got some major problems with syntax, which WILL stop the script from working.  Instead of being defensive, if you could tell us what you want the script to do, we could walk you through it.  As it stands, we're still not sure what you're aiming for, since there are 4 or 5 different ways to show text in a script.  Do you want it to only show in the console?  Do you want it to put text in the chat?  Or do you just want the text to splash for a couple seconds across the middle of the screen?

Formatting != syntax.  Nick, what you just showed would be rejected anywhere because it's unreadable, but it would still compile (assuming the compiler ignores whitespace).
In some languages that's considered proper syntaxical format.

"proper syntax" referred back to this post where I stated the subject as syntaxical format. So, yes, you just restated my very clearly implied point. Thanks.

As it stands, we're still not sure what you're aiming for, since there are 4 or 5 different ways to show text in a script.  Do you want it to only show in the console?  Do you want it to put text in the chat?  Or do you just want the text to splash for a couple seconds across the middle of the screen?
It's a hello world script.

Just make the text appear where it would be visible when the conditions are met. For example, a console command should show "hello world" in the console, where if it were a serverCmd, it should show up as a chat message.