PDA

View Full Version : error 035: argument type mismatch (argument 2)


Pachino
31/08/2018, 10:56 PM
Please help me to fix this problem, this code line:

SetDynamicObjectMaterialText(spwnobjid, "{FFFFFF}MARKET", 0, 120, "Ariel", 100, 1, 0x00000000, 0x00000000, 1);

solstice_
31/08/2018, 11:13 PM
Please help me to fix this problem, this code line:

SetDynamicObjectMaterialText(spwnobjid, "{FFFFFF}MARKET", 0, 120, "Ariel", 100, 1, 0x00000000, 0x00000000, 1);


Ariel should be Arial

http://wiki.sa-mp.com/wiki/SetObjectMaterialText, check this.

Pachino
31/08/2018, 11:20 PM
SetDynamicObjectMaterialText(spwnobjid, "{FFFFFF}MARKET", 0, 120, "Arial", 100, 1, 0x00000000, 0x00000000, 1);

Same error...

Dayrion
31/08/2018, 11:35 PM
SetDynamicObjectMaterialText(objectid, materialindex, const text[], materialsize = OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0)

solstice_
31/08/2018, 11:36 PM
SetDynamicObjectMaterialText(spwnobjid, "MARKET", 0, 120, "Arial", 100, 1, 0xFFFFFFFF, 0xFFFFFFFF, 1);

Try this..

EDIT: Didn't see Dayrion's reply but still.

Pachino
31/08/2018, 11:46 PM
Same problem... HELP PLEASE

Dayrion
01/09/2018, 12:42 AM
SetDynamicObjectMaterialText(objectid, materialindex, const text[], materialsize = OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0)

Same problem... HELP PLEASE

Yea dude... READ PLEASE
- You put arguments in the wrong way.

UFF
01/09/2018, 03:46 AM
SetDynamicObjectMaterialText(spwnobjid, 0, "{FFFFFF}MARKET", 0, OBJECT_MATERIAL_SIZE_256x128, "Arial", 22, 0, 0xFF0000FF, 9, 0);

try this

Pachino
01/09/2018, 12:43 PM
Doesnt work, help me please, same error!

Dayrion
01/09/2018, 01:33 PM
Is this guy completely ignoring me or what?

Pachino
01/09/2018, 01:43 PM
Is this guy completely ignoring me or what?

I dont have an example, can you use your example on my code and send me?

Dayrion
01/09/2018, 01:50 PM
I dont have an example, can you use your example on my code and send me?

uh, wat.
I pointed out the syntax you have to follow. You just need to edit your code to fill completely with ne native syntax. That's all. No example are needed.

Shinja
01/09/2018, 02:51 PM
SetDynamicObjectMaterialText(objectid, materialindex, const text[], materialsize = OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0)

Indeed he is

From wiki
materialindex The material index on the object to change (0 to 15)

UFF
01/09/2018, 08:42 PM
SetDynamicObjectMaterialText(objectid, materialindex, const text[], materialsize = OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0)

Indeed he is

From wiki
materialindex The material index on the object to change (0 to 15)


here is the code which i gave him.

SetDynamicObjectMaterialText(spwnobjid, 0, "{FFFFFF}MARKET", 0, OBJECT_MATERIAL_SIZE_256x128, "Arial", 22, 0, 0xFF0000FF, 9, 0);

try this


Reply from him.
Doesnt work, help me please, same error!

any idea?, @Shinja

Undef1ned
01/09/2018, 08:53 PM
Try this:

SetDynamicObjectMaterialText (spwnobjid, 0, "{FFFFFF} MARKET", 120, "Arial", 100, 1, 0x00000000, 0x00000000, 1);

GaMiX
02/09/2018, 12:22 AM
What error did you get ?!

GaMiX
02/09/2018, 12:25 AM
This will work

SetDynamicObjectMaterialText(spwnobjid, "{FFFFFF}MARKET", 0, OBJECT_MATERIAL_SIZE_256x128, "Arial", "100", 1, 0x00000000, 0x00000000, 1);

you missed ""

UFF
02/09/2018, 03:37 AM
This will work

SetDynamicObjectMaterialText(spwnobjid, "{FFFFFF}MARKET", 0, OBJECT_MATERIAL_SIZE_256x128, "Arial", "100", 1, 0x00000000, 0x00000000, 1);

you missed ""

This Won't work. Since the syntax of that function is wrong.

SetDynamicObjectMaterialText(objectid, materialindex, const text[], materialsize = OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0)

@Pachino, Can you show your spwnobjid code?

Undef1ned
02/09/2018, 04:01 AM
The correct way is as I mentioned earlier. You simply have to follow the indicated format.

SetDynamicObjectMaterialText (spwnobjid, 0, "{FFFFFF} MARKET", 120, "Arial", 100, 1, 0x00000000, 0x00000000, 1);

Sew_Sumi
02/09/2018, 04:40 AM
I'd suggest to follow Shinja and Dayrion...

Though what was pointed out earlier should've been picked up on and queried to those who pointed things out.

SetDynamicObjectMaterialText(spwnobjid, 0, "{FFFFFF}MARKET", 0, OBJECT_MATERIAL_SIZE_256x128, "Arial", 22, 0, 0xFF0000FF, 9, 0);

try this

Is this guy completely ignoring me or what?

What seems to be the case, is that the OP has copied a section of code for non-streamer, and simply renamed the function by putting "Dynamic" in the function, and compiled.