Creating Classes in PAWNO?
#1

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..
Reply
#2

Pawn (not Pawno) is a strictly procedural language. So no, not possible. Regrettably.
Reply
#3

Right, PAWN, sorry.
That's quite a shame though, is there a way you (or anyone else) can think of to use linked lists or stacks or Queues at least?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)