04.07.2016, 16:55
Hey, I'd like to create classes, like in other programming languages.
I've wanted this for a long time, so I thought I'd give it a shot now.
I need to do something like C++ for example:
class Cop {
private int rank;
private string signature;
// more properties...
//methods for Cop.
GetRank()
{
return rank;
}
// more methods...
}
int main()
{
Cop cop = new Cop();
int x = cop.GetRank();
printf("Your rank is $d.",x);
return 0;
}
anyone got any idea how to do this in PAWNO? I can't seem to find anything about making your own classes, nested classes, etc..
I've wanted this for a long time, so I thought I'd give it a shot now.
I need to do something like C++ for example:
class Cop {
private int rank;
private string signature;
// more properties...
//methods for Cop.
GetRank()
{
return rank;
}
// more methods...
}
int main()
{
Cop cop = new Cop();
int x = cop.GetRank();
printf("Your rank is $d.",x);
return 0;
}
anyone got any idea how to do this in PAWNO? I can't seem to find anything about making your own classes, nested classes, etc..