ok so i'm using the devil gui and it returns a string from the combo box that contains the list of the piece that i want to build. i also have a button that builds the selected piece but i need to switch from a string to an entity handle. here's the code. look at the select in the beginning and in the second if for ent%.
Function update_input() Local temp_text$ Local temp_text2$ If GUI_AppEvent()=track_combobox GUI_Message(track_combobox,"gettext",1) Select temp_text Case "straight" temp_text2="track_straight" ent%=temp_text2 Case "curve right" temp_text2="track_c_right" ent%=temp_text2 End Select End If If GUI_AppEvent()=build_button t.track=New track t\ent=CopyEntity (ent) t\mat="metal" EntityPickMode t\ent,2 EntityColor t\ent,81,81,81 PositionEntity t\ent,0,2,0 win_state="maximize" End If GUI_Message(mat_window,win_state,1) End Function