|
| 01 Nov 2015 11:19 PM |
stuff local Chars = require(game.ReplicatedStorage.Chars) stuff local char = Chars.GetChar(char) if char[1] ~= nil then <- source of error
Example = {"Example","Example","Example}
function Chars.GetChar(char) return char end
I might just be doing something stupid because I'm tired. oh man i am not good with computer plz to halp |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 01 Nov 2015 11:20 PM |
| because Chars.GetChar(char) is returning nil. |
|
|
| Report Abuse |
|
|
PvN
|
  |
| Joined: 10 Apr 2010 |
| Total Posts: 22145 |
|
| |
|
|
| 01 Nov 2015 11:24 PM |
| Example = {"Example","Example","Example} should be Example = {"Example","Example","Example"}, it's not the source of the error |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2015 11:27 PM |
Let me start over I am half alseep right now why am i trying to script
Text module:
stuff local Chars = require(game.ReplicatedStorage.Chars) stuff local char = Chars.GetChar(char) if char[1] ~= nil then <- source of error
Chars Module:
Example = {"Example","Example","Example"}
function Chars.GetChar(char) return char end
Test script:
local Text = require(game.ReplicatedStorage.Text) Text.PrintText(Example,"Hi") |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2015 11:28 PM |
Error is
23:27:25.143 - ReplicatedStorage.Text:24: bad argument #3 to 'Text' (string expected, got nil) |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2015 11:32 PM |
Okay this is supposed to return a table:
Example = {"Example","Example","Example}
function Chars.GetChar(char) return char end
what amI doing wrong |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 01 Nov 2015 11:33 PM |
| Okay 'local char = Chars.GetChar(char)' at that point char is nil (unless it's part of the "stuff") |
|
|
| Report Abuse |
|
|