View Issue Details

IDProjectCategoryView StatusLast Update
0008360Multi Theft Auto : San AndreasScriptingpublic2014-07-15 18:44
ReporterCheezAssigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformPCOSWindowsOS Version7
Product Version 
Target Version1.4Fixed in Version1.4 
Summary0008360: OOP functions don't work with GuiStaticImage elements
Description

You receive the error:
attempt to index global/local 'GUI_STATIC_IMAGE_ELEMENT' (a userdata value)

Steps To Reproduce

local Image = GuiStaticImage(0,0,0,0,"image.png",false);
Image.image = "image2.png";
Image:setSize(100,100,false);

TagsNo tags attached.

Activities

qaisjp

2014-07-15 15:42

administrator   ~~0021352

Does GuiStaticImage.SetSize(Image, 100, 100, false)
If it does, Cazomino05 or another dev will have to apply the metatable (it means that the method definitions have been written but the actual methods have not been applied to the individual element)

Cheez

2014-07-15 15:47

viewer   ~~0021353

That doesn't work either.

Jusonex

2014-07-15 15:51

administrator   ~~0021354

https://code.google.com/p/mtasa-blue/source/browse/trunk/MTA10/mods/shared_logic/luadefs/CLuaClassDefs.cpp#316
https://code.google.com/p/mtasa-blue/source/browse/trunk/MTA10/mods/shared_logic/lua/CLuaMain.cpp#1064
CLuaClassDefs uses "GuiImage" whereas CLuaMain uses "GuiStaticImage".

qaisjp

2014-07-15 18:17

administrator   ~~0021357

Cheez, thanks for the report. Thanks Jusonex, now fixed in r6682 ( https://code.google.com/p/mtasa-blue/source/detail?r=6682 )

Issue History

Date Modified Username Field Change