SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 17/10/2019, 11:30 PM   #1
GuiKommander
Gangsta
 
GuiKommander's Avatar
 
Join Date: Dec 2016
Posts: 799
Reputation: 25
Default string

Bom, eu estou estudando mais profundamente as strings.
E tenho essa dúvida:

Bom, eu criei uma variável com 23 caracteres.
Sendo essa variável:

PHP Code:
new var_original[23] = "912|8239|2830|820301|8"
Ai eu queria printar as 3 primeiras caracteres, sendo assim:

PHP Code:
printf("%s, %s, %s"var_original[0], var_original[1], var_original[2]); 
Mas o console printa isso:

Code:
912|8239|2830|820301|8, 12|8239|2830|820301|8, 2|8239|2830|820301|8
Ao invez disso:

Code:
9, 1, 2
Porque??
__________________
Programo sistemas simples até os mais complexos por remuneração.
Todos os códigos dinâmicos.
GuiKommander is offline   Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error 037: invalid string (possibly non-terminated string) AnoTek Scripting Help 4 13/03/2017 02:08 PM
input line too long (after substitutions) invalid string (possibly non-terminated string) StackedPizza Scripting Help 4 09/11/2016 03:34 AM
error 037: invalid string (possibly non-terminated string) ridhoswasta Scripting Help 2 19/06/2014 04:34 PM
string too small. but i dont wanna make the string like 9999.. niels44 Scripting Help 2 23/10/2012 06:36 PM
input line too long (after substitutions) - invalid string (possibly non-terminated string) MahmutBey Help Archive 6 10/03/2011 02:39 PM


All times are GMT. The time now is 02:48 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.