Jump to content

Whats wrong with my underscores?


myxomatosii
 Share

Recommended Posts

GUICreate("Hamster Pellet Counter")
GuiSetState(@sw_show)
$ctl=GuiCtrlCreateCombo("Town Hall",10,10)
GuiCtrlSetData(-1,"Academy|Warehouse|Tavern|Palace/Gov.Res.|Museum|Trading Port"_
_"Shipyard|Barracks|Town Wall|Embassy|Trading Post|Workshop|Hideout|Forester's House|"_
_"Glassblower|Alchemist's Tower|Winegrower|Stonemason|Carpenter|Optician|"_
_"Firework Test Area|Wine Press|Architect's Office","Town Hall")
While 1
WEnd

i searched google and this site and all results that come back are never for basic question instead they always are pointing at very hard scripts

i have a very basic question on how to continue line

Edited by myxomatosii
Link to comment
Share on other sites

;;;;;;;;;;main control code;;;;;;;;;;
;city1 code
GUICreate("Hamster Pellet Counter")
GuiSetState(@sw_show)
$ctl=GuiCtrlCreateCombo("Town Hall",10,10)
GuiCtrlSetData(-1,"Academy|Warehouse|Tavern|Palace/Gov.Res.|Museum|Trading Port|" _
"Shipyard|Barracks|Town Wall|Embassy|Trading Post|Workshop|Hideout|Forester's House|" _
"Glassblower|Alchemist's Tower|Winegrower|Stonemason|Carpenter|Optician|" _
"Firework Test Area|Wine Press|Architect's Office","Town Hall")
While 1
WEnd

ok i changed it to this, now my error is coming up on the line after the first line lol, does format for this change after the first line?

C:\Documents and Settings\.. : ERROR: syntax error

"Shipyard|Barracks|Town Wall|Embassy|Trading Post|Workshop|Hideout|Forester's House|"

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Documents and Settings\.. - 1 error(s), 0 warning(s)

Edited by myxomatosii
Link to comment
Share on other sites

  • Developers

when you concatenate strings you need to use an ampersand (&)

"string 1 " & _
"string 2"

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

GUICreate("Hamster Pellet Counter")
GuiSetState(@sw_show)
$ctl=GuiCtrlCreateCombo("Town Hall",10,10)
GuiCtrlSetData(-1,"Academy|Warehouse|Tavern|Palace/Gov.Res.|Museum|Trading Port|" &_
"Shipyard|Barracks|Town Wall|Embassy|Trading Post|Workshop|Hideout|Forester's House|" &_
"Glassblower|Alchemist's Tower|Winegrower|Stonemason|Carpenter|Optician|" &_
"Firework Test Area|Wine Press|Architect's Office","Town Hall")
While 1
WEnd

i think i am not following you, i did that now and i still get the same error on the same line... =(

sorry my level is low

Link to comment
Share on other sites

  • Developers

GUICreate("Hamster Pellet Counter")
GuiSetState(@sw_show)
$ctl=GuiCtrlCreateCombo("Town Hall",10,10)
GuiCtrlSetData(-1,"Academy|Warehouse|Tavern|Palace/Gov.Res.|Museum|Trading Port|" &_
"Shipyard|Barracks|Town Wall|Embassy|Trading Post|Workshop|Hideout|Forester's House|" &_
"Glassblower|Alchemist's Tower|Winegrower|Stonemason|Carpenter|Optician|" &_
"Firework Test Area|Wine Press|Architect's Office","Town Hall")
While 1
WEnd

i think i am not following you, i did that now and i still get the same error on the same line... =(

sorry my level is low

You made the same error as you did initially... the space is missing again.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

GUICreate("Hamster Pellet Counter")
GuiSetState(@sw_show)
$ctl=GuiCtrlCreateCombo("Town Hall",10,10)
GuiCtrlSetData(-1,"Academy|Warehouse|Tavern|Palace/Gov.Res.|Museum|Trading Port|"& _
"Shipyard|Barracks|Town Wall|Embassy|Trading Post|Workshop|Hideout|Forester's House|"& _
"Glassblower|Alchemist's Tower|Winegrower|Stonemason|Carpenter|Optician|"& _
"Firework Test Area|Wine Press|Architect's Office","Town Hall")
While 1
WEnd

got it! thanks for being patient with me Jos~

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...