View Issue Details

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

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.

Relationships

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

Activities

Jaysds1

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.
http://code.google.com/p/mtasa-blue/source/search?q=outputChatBox&origq=outputChatBox&btnG=Search+Trunk

Kenix

2013-01-30 14:50

updater   ~~0018070

Last edited: 2013-01-30 15:01

Patch: https://docs.google.com/file/d/0B14UHGO57QMdZWFNUU5nV08wNWs/edit

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.

lil_Toady

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.

Kenix

2013-01-30 15:40

updater   ~~0018072

Okay, i will rewrite this.

CWanted

2013-02-02 10:34

updater   ~~0018098

Last edited: 2013-02-02 16:09

http://code.google.com/p/mtasa-blue/source/detail?r=4966

Issue History

Date Modified Username Field Change