noah
|
  |
| Joined: 11 Sep 2006 |
| Total Posts: 18977 |
|
|
| 18 Nov 2015 12:40 PM |
Can anyone help me out and take a look at my script? I'm trying to make a function that finds a string in an array and if it's there then it returns the index of it. codepad.org /1jTveJlG |
|
|
| Report Abuse |
|
|
cars37
|
  |
| Joined: 27 Nov 2013 |
| Total Posts: 189 |
|
|
| 18 Nov 2015 01:35 PM |
| You're supposed to add "int i;" before "for (i = 1; i < size; i++) {" |
|
|
| Report Abuse |
|
|
noah
|
  |
| Joined: 11 Sep 2006 |
| Total Posts: 18977 |
|
|
| 18 Nov 2015 01:46 PM |
Ohhh right right Well new error and it's telling me it only works for chars, but I need to use it for a string
/Kjdr3A8T |
|
|
| Report Abuse |
|
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
|
| 18 Nov 2015 01:48 PM |
couldn't you do " "for (int i = 1; i < size; i++) {"
-=Robo=- |
|
|
| Report Abuse |
|
|
noah
|
  |
| Joined: 11 Sep 2006 |
| Total Posts: 18977 |
|
| |
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
|
| 18 Nov 2015 01:54 PM |
i can't load the page lol i was just talking about sfgfdhjngio
-=Robo=- |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
|
| 18 Nov 2015 02:02 PM |
moneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoney
-=Robo=- |
|
|
| Report Abuse |
|
|
noah
|
  |
| Joined: 11 Sep 2006 |
| Total Posts: 18977 |
|
|
| 18 Nov 2015 02:29 PM |
| Finally figured it out. Thanks guys. |
|
|
| Report Abuse |
|
|