View Issue Details

IDProjectCategoryView StatusLast Update
0007378Multi Theft Auto : San AndreasRequiredpublic2013-02-02 10:34
ReporterRansomAssigned ToKenix 
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0007378: outputChatBox: visibleTo is not checked for errors

output = outputChatBox ( "HI you", dfgsdgdsg, 255, 0, 0, false )
outputChatBox ( tostring(output))

^This outputs true and the chat still creates, but since visibleTo failed no colors are applied and there is no debug messages.

TagsNo tags attached.


related to 0007493 resolvedKenix Source patches Patch for #0007378: outputChatBox: visibleTo is not checked for errors 



2013-01-30 03:39

viewer   ~~0018057

Last edited: 2013-01-30 03:44

I don't think this is part of the MTA Resources Project,
and I'm not sure if this is fixed because I'm currently looking at the Source Code and it looks like it's fixed.


2013-01-30 14:50

updater   ~~0018070

Last edited: 2013-01-30 15:01


outputChatBox( 'Something' ) -- true ( all optional arguments by default )
outputChatBox( 'Something', nil ) -- true ( because 2nd argument is root by default )
outputChatBox( 'Something', nil, nil, nil, nil, nil ) -- true ( because all arguments by default )
outputChatBox( 'Something', nil, 255, 0, 0, false ) -- true ( output text with red color )
srun outputChatBox( '#FF0000a #00FF00b', nil, nil, nil, nil, true ) -- true ( color coded text )
outputChatBox( nil ) -- false ( bad type )
outputChatBox( 'Something', pElement ) -- ( element pointer( userdata ),player left server for example ) false ( bad element pointer )

Well i don't have rights for apply this patch.


2013-01-30 15:36

administrator   ~~0018071

Changing the comparsion on the first argument to LUA_TSTRING was a mistake, the lua_makestring function call converts the argument to string, no matter what was passed to it. (outputChatBox(nil) should output "nil")
Also, i'm not sure you should've made rgb arguments independant, passing "255, nil, 255" would result in "255, 221, 255", which is misleading.
And eventually, if you decided to reorganize it, would've been great if you used argstream, rather than the old way.


2013-01-30 15:40

updater   ~~0018072

Okay, i will rewrite this.


2013-02-02 10:34

updater   ~~0018098

Last edited: 2013-02-02 16:09

Issue History

Date Modified Username Field Change