| Yoko http://forum.yoko.com.ua/ |
|
| how to uo.print this variable? http://forum.yoko.com.ua/viewtopic.php?f=3&t=16870 |
Page 1 of 1 |
| Author: | Shokarta [ 2012-01-15 17:25:34 ] |
| Post subject: | how to uo.print this variable? |
he guys, I am using a simple walking lumberjack script, which works fine... but if it gets stuck in the middle i need to go back on the position is started and start over again... so I wanted to put some ID when i start (so it will ask me where to start)... works fine but if i dont know the ID of the move (variable n in the script) then im fucked... so al works fine, i can define ID where to start, but I need the script to show me the ID of every move i do Code: UO.deletejournal() when try it shows error "Runtime error - Invalid operation for this type" on row UO.Print("Action: " + direction + ", ID# " + n), well i dont know how to print the n variable anyway on the row uo.print("Starting at ID# " + mid(uo.journal(radek), len(name)+2, 10)) it actually prints it, just dont know what mid() and len() does, so it could be my second question what those functions does |
|
| Author: | ZeroDX [ 2012-01-15 17:34:47 ] |
| Post subject: | Re: how to uo.print this variable? |
1) UO.Print("Action: " + direction + ", ID# " + str(n)) 2) len returns the length of the string uo.Print(str(len('1234'))) => 4 uo.Print(str(len('123'))) => 3 3) Code: var string = '0123456789'=> '2345' |
|
| Page 1 of 1 | All times are UTC+02:00 |
| Powered by phpBB® Forum Software © phpBB Limited https://www.phpbb.com/ |
|