How to work with "class"
#1

Hello,
I trying to used the methods of class C in PAWN
I wrote this script:
pawn Код:
#include <a_samp>

class A {//(3) : error 010: invalid function or declaration
    int alfa;
    float beta;
}

A x;//(8) : error 010: invalid function or declaration

main()
{
    x.alfa = 1;//12
    x.beta = 3.1;
}
And errors:
Quote:

C:\Users\Atoma_000\Desktop\samp03z\pawno\new.pwn(3 ) : error 010: invalid function or declaration
C:\Users\Atoma_000\Desktop\samp03z\pawno\new.pwn(8 ) : error 010: invalid function or declaration
C:\Users\Atoma_000\Desktop\samp03z\pawno\new.pwn(1 2) : error 017: undefined symbol "x"
C:\Users\Atoma_000\Desktop\samp03z\pawno\new.pwn(1 2) : error 029: invalid expression, assumed zero
C:\Users\Atoma_000\Desktop\samp03z\pawno\new.pwn(1 2) : error 017: undefined symbol "alfa"
C:\Users\Atoma_000\Desktop\samp03z\pawno\new.pwn(1 2) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


6 Errors.
Thanks for help.
Reply


Messages In This Thread
How to work with "class" - by ATomas - 31.03.2014, 16:19
Re: How to work with "class" - by Anzipane - 31.03.2014, 16:21
Re : How to work with "class" - by Younes44 - 31.03.2014, 16:24
Re: How to work with "class" - by Konstantinos - 31.03.2014, 16:28

Forum Jump:


Users browsing this thread: 1 Guest(s)