View Issue Details

IDProjectCategoryView StatusLast Update
0006021Multi Theft Auto : San AndreasScriptingpublic2016-09-15 11:41
ReporterPhatLooserAssigned ToJusonex 
PrioritylowSeverityfeatureReproducibilityalways
Status resolvedResolutionfixed 
PlatformallOSallOS Versionall
Product Version1.0.5 
Target Version1.5.3Fixed in Version1.5.3 
Summary0006021: should "outputDebugString" automatically "tostring" values that ain't a string?
Description

Just a question, would this make sense?
For me it would, but maybe its against some convention of LUA or something.

TagsNo tags attached.

Activities

arranTuna

2011-03-29 21:48

manager   ~~0013139

outputDebugString should accept numbers at least, like chatbox does.

MX_Master

2011-03-30 15:22

viewer   ~~0013140

it's only LUA conversations, not MTASA, and it's your own problem to convert all stuff to string before setting it as parameter for MTASA functions

PhatLooser

2011-03-31 15:02

reporter   ~~0013144

Its not only "your own problem", if it makes scripting faster.

MX_Master

2011-03-31 15:39

viewer   ~~0013145

to "make your scripting faster" just create a link to function tostring with short name or create a new own function which receives vars of any type, converts them to string and outputs into chat (:

checking variables types it's only scripter's problem, LUA support only number -> string built-in conversation

arranTuna

2011-03-31 16:01

manager   ~~0013146

Thats not fast. Look, all PhatLooser is asking is if whatever is passed to outputDebugString to be automatically turned into a string by MTA because it saves time. If you do outputDebugString(false) you'll get a debug warning for outputDebugString, how ironic is that?

Advantages:

  • Saves time
  • Makes more sense to see "false" than a a debug warning
  • Makes further sense as the name is "outputDebugString" therefore it should output a string as the name of the function suggests.

Disadvantages:

  • Time taken to implement

Talidan

2011-06-30 21:51

administrator   ~~0013871

I think this definitely should be done for outputDebugString. I believe Lua's print function does this

Jusonex

2016-09-14 22:49

administrator   ~~0025202

Reappeared during "argstreaming" apparently

Issue History

Date Modified Username Field Change