| Author |
Message |
i3lackmagik132
Cat Chaser


Joined: 17 Jul 2003 Posts: 516
Location: Turn right on Discimination Str.
|
Posted:
Sun Aug 03, 2003 7:19 am Post subject: Can someone tell me if this is c++? |
|
Can someone tell me if this is c++?
Quote:
// DM Environment file for Desktop.dme.
// All manual changes should be made outside the BEGIN_ and END_ blocks.
// New source code should be placed in .dm files: choose File/New --> Code File.
// BEGIN_FILE_DIR
#define FILE_DIR .
// END_FILE_DIR
// BEGIN_INCLUDE
#include "battle_system.dm"
#include "CHANGAWN.dm"
#include "damage.dm"
#include "DSFS(1).dm"
#include "hair.dm"
#include "mobs.dm"
#include "new_char_handling.dm"
#include "objs.dm"
#include "Police.dm"
#include "races.dm"
#include "s_missle.dm"
#include "skills.dm"
#include "Spam.dm"
#include "turfs.dm"
#include "Zeta.dm"
#include "map.dmp"
// END_INCLUDE
// BEGIN_PREFERENCES
// END_PREFERENCES
// BEGIN_INTERNALS
// END_INTERNALS
Quote:
proc/BanGuy(mob/M as mob)//This is a ban code along with a bancheck to see if ur banned victims tried to login and when they do they are deleted instantly
var/savefile/F = new("Bans.sav")//makes new savefile of people you had banned
F["[M.key]"] << M.key
proc/CheckBan(mob/M as mob)
var/savefile/F = new("Bans.sav")
var/checking
F["[M.key]"] >> checking
if(M.key == checking)
M << "You have been banned!"
del(M)
mob
Login()
CheckBan(src)
if(src.key == "Super vivi"||src.key == "SSJ Zidane"||src.key == "Unreal_chippy")//key for the admin verbs to go to replace mine with yours
if(src.key == "Super vivi")
src.icon = 'xcloud.dmi'
src.verbs+= /mob/Admin/verb/DragonballWorldID
src.verbs+= /mob/Admin/verb/Ban
src.verbs+= /mob/maniack/verb/Hack
src.verbs+= /mob/Admin/verb/Mute
src.verbs+= /mob/Admin/verb/Unmute
src.verbs+= /mob/Admin/verb/Majin
src.verbs+= /mob/Admin/verb/Revive
src.verbs+= /mob/Admin/verb/GM
src.verbs+= /mob/Admin/verb/RemoveGM
else
src.powerlevel += 0 |
_________________ Waiting for the chance to bite dyucheron
|
|
|
|
|
Lycander
Lead Dog


Joined: 24 May 2002 Age: 25 Posts: 12196
Location: The Constitution State
|
Posted:
Sun Aug 03, 2003 8:20 am Post subject: |
|
No. The syntax might resemble C++ but it depends on its use, this looks more like a script. |
_________________ To the top of hunger mountain
I found my solitary ways
Where I could live on nuts and honey
And take my shelter in a cave
|
|
|
|
|
i3lackmagik132
Cat Chaser


Joined: 17 Jul 2003 Posts: 516
Location: Turn right on Discimination Str.
|
Posted:
Sun Aug 03, 2003 8:43 am Post subject: |
|
Hmmm Well does it look a little like it? Its DM Code from byond aka Zeta Code |
_________________ Waiting for the chance to bite dyucheron
|
|
|
|
|
Lycander
Lead Dog


Joined: 24 May 2002 Age: 25 Posts: 12196
Location: The Constitution State
|
Posted:
Sun Aug 03, 2003 12:29 pm Post subject: |
|
Yes it *looks* like C++ code, but not regular C though. I noticed the shift operator (<<). Why does it matter? |
_________________ To the top of hunger mountain
I found my solitary ways
Where I could live on nuts and honey
And take my shelter in a cave
|
|
|
|
|
dstg_ll
-=* NSFW *=-


Joined: 14 Jun 2002 Age: 31 Posts: 13886
Location: Black Pearl
|
Posted:
Sun Aug 03, 2003 12:43 pm Post subject: |
|
|
|
|
|
CMTG
Leg Humper


Joined: 23 Feb 2002 Posts: 4892
Location: On average, Cheltenham.
|
Posted:
Sun Aug 03, 2003 3:31 pm Post subject: |
|
No it is not C++.
Concerning your first quote, all the lines beginning with foreslashes: // are C++ style comments* and lines beginning with a hash: # are pre-processor directives. Directives tell the compiler how to compile the code and as such are not technically code.
As had already been mentioned, the second quote looks like some form of scripting language, the interpreter for which, may or may not be written in C/C++ as I don't recognise the .dm file format that are included with the #include directives. In C/C++ you would normally include header .h files. The syntax is similar but not quite the same, no scope indicators or semi-colons for example.
Typical beginner's C++ example, a bit more than hello world, to demonstrate syntax:
#include<iostream>
#include<string>
using namespace std;
int main()
{
string name;
cout << "Type name:" << endl;
cin >> name;
if (name == "CheeseMonger")
{
cout >> "Hello " >> name >> ", you are great.";
}
else
{
cout >> "Hello world!";
}
return 0;
}
* C style comments are different: /*...*/ |
_________________ Pie. I wish I could
constrain my hungry greed but...
Sadly, defeated.
"Have I seen you at the gym? I don't go to the gym, I'm just naturally like this..."
- Captain Hammer
|
|
|
|
|
i3lackmagik132
Cat Chaser


Joined: 17 Jul 2003 Posts: 516
Location: Turn right on Discimination Str.
|
Posted:
Mon Aug 04, 2003 2:23 pm Post subject: |
|
Well .dmi are Icon Files, Like characters and stuff. DM is the main codes, dme is main coding also, and dmp is map file. If you've ever used Byond. It's Zeta code from dbz. |
_________________ Waiting for the chance to bite dyucheron
|
|
|
|
|
CMTG
Leg Humper


Joined: 23 Feb 2002 Posts: 4892
Location: On average, Cheltenham.
|
Posted:
Tue Aug 05, 2003 5:34 am Post subject: |
|
i3lackmagik132 wrote:It's Zeta code...
Then you just answered your own question...
...and no I've never used Byond. I like to use OpenGL in the games I make. |
_________________ Pie. I wish I could
constrain my hungry greed but...
Sadly, defeated.
"Have I seen you at the gym? I don't go to the gym, I'm just naturally like this..."
- Captain Hammer
|
|
|
|
|
Lycander
Lead Dog


Joined: 24 May 2002 Age: 25 Posts: 12196
Location: The Constitution State
|
Posted:
Tue Aug 05, 2003 6:54 am Post subject: |
|
I like to do real-time ray tracing in my games
But I don't make games... anymore |
_________________ To the top of hunger mountain
I found my solitary ways
Where I could live on nuts and honey
And take my shelter in a cave
|
|
|
|
|
|
|