![]() |
For() with strings?
Ok i want to make scripts short and simple as possible.. So is there any way to make a script using the for() to add a number and get the string info with out just making the string like a word (i have problems with this z.Z)..
PHP Code:
|
PHP Code:
Also, I really have no idea what you're trying to do with that script, it doesn't look like its doing anything. |
its just an example, like theres a server string called, "serverr.station.1="head.png","UniStation","RyDaze : Hello","stationlink","hat-.png"
Anywho im trying to make a script that takes for() and takes info from a server string, aka "this.stationinfo = @serverr.station@ "." @this.station;" this.stationinfo = this.stationinfo.tokenize(); than after that works i can use the "this.stationinfo[1]" and stuff for the radio display instead of making it detect check what station your on and than making the script really long depending on how many stations there are.. so i wont have to add like another display for station2 that contains station2 strings.. i want it to be one display that auto changes the this.stationinfo, when this.station changes to a diffrent #. |
temp.stations.size()+1
|
Ok.. maybe im not getting my problem out clearly? or something.. So here goes nothing!
Quote:
|
this.stationinfo = serverr.station.(@this.station).tokenize();
maybe? The script doesn't make much sense in the end... Perhaps onRadio should be doing return serverr.station.(@this.station).tokenize(); if you want the function to return an array to the calling function. |
Well for one:
temp.startstring = "serverr.station"; temp.startstring is going to = serverr.station, not the value of serverr.station, because you enclosed the variable in quotations. temp.startstring = serverr.station; Also what Inverness said, you can't pass temp.vars from one function to another(unless you pass the temp.var in the function parameters, which you should do in this case). |
Quote:
|
Ok, thanks :)
|
| All times are GMT +2. The time now is 03:53 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.