Jump to content

getVehicleModelFromName Variable?


Recommended Posts

My second topic today ( sorry )

Im using getvehiclemodelfromname, it should get it from a variable:

a = guiGridListGetSelectedItem ( list ) 
id = getVehicleModelFromName ( a ) -- wrong 
id = getVehicleModelFromName ( tostring(a) ) -- wrong 
id = getVehicleModelFromName ( "tostring(a)" ) -- wrong 
id = getVehicleModelFromName ( "Alpha" ) -- works 

How to let it know it's a variable?

EDIT: Found the error, now how to fix it?

The error is my gridlist give's a number instead of the variable. in example:

Alpha = guiGridListAddRow ( list )

guiGridListSetItemText ( list_vehicles, Alpha, vehicle_column, "Alpha", false, false )

This gives me a number, : 0. Second i created gives me a 1. How to get the variable's name?

EDIT2: I used guiGridListGetSelectedItem which will give you the number. :/ Any way to get the text in it? So from the row i selected?

Link to comment

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
  • Recently Browsing   0 members

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