How to work with "class" - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to work with "class" (
/showthread.php?tid=503860)
How to work with "class" -
ATomas - 31.03.2014
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.
Re: How to work with "class" -
Anzipane - 31.03.2014
PAWN is not an object-oriented programming language. There is no concept of class in PAWN, sorry.
Re : How to work with "class" -
Younes44 - 31.03.2014
i think that you need Latest Version of Sympol
try it and tell me
if i help you rep me
Re: How to work with "class" -
Konstantinos - 31.03.2014
http://www.compuphase.com/pawn/Pawn_Language_Guide.pdf