SA-MP Forums Archive
Failing to change a objects material - 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: Failing to change a objects material (/showthread.php?tid=546664)



Failing to change a objects material - TheSAMPGamer - 16.11.2014

So I'm HORRIBLE at scripting, enough said. I'm trying to change the material of this object using SetDynamicObjectMaterial and it is saying:

Код:
C:\Users\Jack\Desktop\Desktop\Server\gamemodes\map.pwn(36) : error 017: undefined symbol "CreateDynamicObject"
C:\Users\Jack\Desktop\Desktop\Server\gamemodes\map.pwn(37) : error 017: undefined symbol "SetDynamicObjectMaterial"
C:\Users\Jack\Desktop\Desktop\Server\gamemodes\map.pwn(39) : warning 217: loose indentation
C:\Users\Jack\Desktop\Desktop\Server\gamemodes\map.pwn(36) : warning 204: symbol is assigned a value that is never used: "wall"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Again I am HOR-RIB-AL at coding so if you could just please give me some help it would be much appreciated!

Also my code is:

Код:
public OnGameModeInit()
{
	//SetObjectMaterial
new wall = CreateDynamicObject(19362, 1094.85278, -1392.67969, 14.45113,   0.00000, 0.00000, 0.00000);
SetDynamicObjectMaterial(wall, 0, 3924, "rc_warhoose", "white", 0xFFFFFFFF);



Re: Failing to change a objects material - Capua - 16.11.2014

Download Ignocito's streamer include and add:
#include <streamer>


Re: Failing to change a objects material - TheSAMPGamer - 16.11.2014

Done that, the errors now:
Quote:

C:\Users\Jack\Desktop\Desktop\Server\pawno\include \streamer.inc(167) : error 017: undefined symbol "OBJECT_MATERIAL_SIZE_256x128"
C:\Users\Jack\Desktop\Desktop\Server\pawno\include \streamer.inc(197) : error 017: undefined symbol "MAPICON_LOCAL"
C:\Users\Jack\Desktop\Desktop\Server\pawno\include \streamer.inc(242) : error 017: undefined symbol "MAPICON_LOCAL"
C:\Users\Jack\Desktop\Desktop\Server\gamemodes\map .pwn(40) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.

and the code:

There is nothing on them lines, literally.


Re: Failing to change a objects material - davve95 - 16.11.2014

Try to create the variable "wall" on top of your script instead. I mean there all includes etc are.


Re : Failing to change a objects material - StreetRP - 16.11.2014

Update you'r include streamer ..

Or :

#define MAPICON_LOCAL 0


Re: Failing to change a objects material - TheSAMPGamer - 16.11.2014

Neither work.