SA-MP Forums Archive
Adding New Objects! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Adding New Objects! (/showthread.php?tid=235346)



Adding New Objects! - Celius - 05.03.2011

Hey, converted my MTA file to a the .pwn CODE

How do i add it in? please tell me...


Re: Adding New Objects! - Markx - 05.03.2011

Put it under public OnGameModelNit()


Re: Adding New Objects! - Celius - 05.03.2011

I made a new .pwn and i compiled it and got this,.


Код:
C:\Users\Daniel\Desktop\Server\filterscripts\maxips.pwn(3) : warning 235: public function lacks forward declaration (symbol "OnGameModelNit")
C:\Users\Daniel\Desktop\Server\filterscripts\maxips.pwn(5) : error 021: symbol already defined: "CreateObject"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.



Re: Adding New Objects! - Celius - 05.03.2011

please HELP!


Re: Adding New Objects! - alpha500delta - 05.03.2011

Omg you litterally copied Markx, he made a grammar error -.-
Just put it like this

pawn Код:
public OnGameModeInit()
{
    CreateObject(MODEL, X, Y, Z, RX, RY, RZ);//Change to your own coords ofcourse
    return 1;
}



Re: Adding New Objects! - ElChapoGuzman - 05.03.2011

Quote:
Originally Posted by Celius
Посмотреть сообщение
I made a new .pwn and i compiled it and got this,.


Код:
C:\Users\Daniel\Desktop\Server\filterscripts\maxips.pwn(3) : warning 235: public function lacks forward declaration (symbol "OnGameModelNit")
C:\Users\Daniel\Desktop\Server\filterscripts\maxips.pwn(5) : error 021: symbol already defined: "CreateObject"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
you have 2 createobjects i think delete one the other one is just a warning


Re: Adding New Objects! - Celius - 05.03.2011

Код:
C:\Users\Daniel\Desktop\Server\filterscripts\maxips.pwn(1) : warning 235: public function lacks forward declaration (symbol "OnGameModeInit")
C:\Users\Daniel\Desktop\Server\filterscripts\maxips.pwn(3) : error 017: undefined symbol "CreateObject"
C:\Users\Daniel\Desktop\Server\filterscripts\maxips.pwn(4) : error 017: undefined symbol "CreateObject"
C:\Users\Daniel\Desktop\Server\filterscripts\maxips.pwn(5) : error 017: undefined symbol "CreateObject"
C:\Users\Daniel\Desktop\Server\filterscripts\maxips.pwn(6) : error 017: undefined symbol "CreateObject"
C:\Users\Daniel\Desktop\Server\filterscripts\maxips.pwn(7) : error 017: undefined symbol "CreateObject"
C:\Users\Daniel\Desktop\Server\filterscripts\maxips.pwn(8) : error 017: undefined symbol "CreateObject"
C:\Users\Daniel\Desktop\Server\filterscripts\maxips.pwn(9) : error 017: undefined symbol "CreateObject"
C:\Users\Daniel\Desktop\Server\filterscripts\maxips.pwn(10) : error 017: undefined symbol "CreateObject"
C:\Users\Daniel\Desktop\Server\filterscripts\maxips.pwn(11) : error 017: undefined symbol "CreateObject"
C:\Users\Daniel\Desktop\Server\filterscripts\maxips.pwn(12) : error 017: undefined symbol "CreateObject"
C:\Users\Daniel\Desktop\Server\filterscripts\maxips.pwn(13) : error 017: undefined symbol "CreateObject"
C:\Users\Daniel\Desktop\Server\filterscripts\maxips.pwn(14) : error 017: undefined symbol "CreateObject"
C:\Users\Daniel\Desktop\Server\filterscripts\maxips.pwn(15) : error 017: undefined symbol "CreateObject"
C:\Users\Daniel\Desktop\Server\filterscripts\maxips.pwn(16) : error 017: undefined symbol "CreateObject"
C:\Users\Daniel\Desktop\Server\filterscripts\maxips.pwn(17) : error 017: undefined symbol "CreateObject"
C:\Users\Daniel\Desktop\Server\filterscripts\maxips.pwn(18) : error 017: undefined symbol "CreateObject"
C:\Users\Daniel\Desktop\Server\filterscripts\maxips.pwn(19) : error 017: undefined symbol "CreateObject"
C:\Users\Daniel\Desktop\Server\filterscripts\maxips.pwn(20) : error 017: undefined symbol "CreateObject"
C:\Users\Daniel\Desktop\Server\filterscripts\maxips.pwn(21) : error 017: undefined symbol "CreateObject"
C:\Users\Daniel\Desktop\Server\filterscripts\maxips.pwn(22) : error 017: undefined symbol "CreateObject"
C:\Users\Daniel\Desktop\Server\filterscripts\maxips.pwn(23) : error 017: undefined symbol "CreateObject"
C:\Users\Daniel\Desktop\Server\filterscripts\maxips.pwn(24) : error 017: undefined symbol "CreateObject"
C:\Users\Daniel\Desktop\Server\filterscripts\maxips.pwn(25) : error 017: undefined symbol "CreateObject"
C:\Users\Daniel\Desktop\Server\filterscripts\maxips.pwn(26) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


23 Errors.
Still got errors.


Re: Adding New Objects! - Snipa - 05.03.2011

You forgot to close a brace somewhere in your code.


Re: Adding New Objects! - alpha500delta - 06.03.2011

Or you just forgot this:

pawn Код:
#include <a_samp>



Re: Adding New Objects! - JackT - 06.03.2011

you have already defined CreateObject - erase 1 of em