18.05.2007, 06:26
A taste of modifying Pawn to be more like VB, for the VB programmers out there who find it hard to adjust:
Using defines we can change the way if() works
So now we can do stuff like this:
Big question: Does anyone know how to make defines work for 2 words at once, for instance if i wanted to use something like this:
Dim %1 As Integer
If that can be read by a define then it could become
new %1;
But lets say we wanted to do a float, then thats:
Dim %1 As Float
would become:
new Float:%1;
and i don't know how to accodomate that?
Using defines we can change the way if() works
pawn Код:
#define If if(
#define Then ){
#define EndIf }
#define Else }else{
pawn Код:
new bool:t = true;
If t == true Then
//Do somethng
Else
// Do Something else
EndIf
Dim %1 As Integer
If that can be read by a define then it could become
new %1;
But lets say we wanted to do a float, then thats:
Dim %1 As Float
would become:
new Float:%1;
and i don't know how to accodomate that?