Jump to content

table with svg


ysj4

Recommended Posts

Hi can someone help me?

 

local data = 
{
	["roundedRectangle"] = {svgCreate(400, 200, "assets/media/roundedRectangle.svg")},
}

addEventHandler("onClientRender", root, function()
    dxDrawImage(sX / 2 - 200 * size, sY / 2 - 100 * size, 400 * size, 200 * size, data["roundedRectangle"], 0, 0, 0, tocolor(255, 255, 255), false)
end)

so on 5 argument i got warrning about expected material, got table, how to solved this?

Edited by ysj4
Link to comment
  • Moderators
2 hours ago, ysj4 said:

how to solved this?

Remove the sub table.

This is a table: {}. And in your code you have 2 of those.

1 main table and 1 sub table.

In here is the sub table you have to remove:

{svgCreate(400, 200, "assets/media/roundedRectangle.svg")}

You only want the value of svgCreate in your main table.

 

  • Like 2
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...