Team Spartan Cookies & Milk Forums
  • Issue Tracker
  • Donations
  • Search
  • Member List
  • Help

Register

Team Spartan Cookies & Milk Forums Garry's Mod Starfall v
« Previous 1 … 13 14 15 16 17 18 Next »
stargate.setName
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Linear Mode
stargate.setName
12-06-2015, 12:59 PM, (This post was last modified: 12-06-2015, 01:03 PM by SuperPlayer.)
#3
SuperPlayer Offline
TSCM Super Member
****
Posts: 234
Threads: 30
Joined: Oct 2014
RE: sv: SF:Starfall/MIDWAYCONTROLPANAL.txt:15: attempt to call method 'getWirelink' (a ni
Hey xXxANOxXx!

for the first error [SF:main:23: Type mismatch (Expected Entity, got Wirelink)] this happens when you use SA1(a wirelink) in the setName function. But in the function you need to use an entity.

stargate.setName(Gate,Name)
--Gate is the Gate entity
--Name is the string name you want the gate to have

As for the second problem[sv: SF:main:23: Type mismatch (Expected Entity, got table)] you use following to find the gate(s).

local SA = find.byClass("stargate_sg1", Owner1)--This function saves all stargate_sg1 belonging to you in a table. So handle it as a table.

--Just use the first entry in the table:
if IsValid(SA[1]) then--Check if the gate is there
stargate.setName(SA[1],"Test")--If yes set the name of the first gate in the table to "Test"
end


@Destiny's Player

No you shouldnt use SA1 because as I explained its a wirelink and the function uses an Entity.
Find
Reply
« Next Oldest | Next Newest »


Messages In This Thread
stargate.setName - by 4N0NYM - 12-06-2015, 12:45 PM
RE: stargate.setName - by Destiny's Player - 12-06-2015, 12:51 PM
RE: sv: SF:Starfall/MIDWAYCONTROLPANAL.txt:15: attempt to call method 'getWirelink' (a ni - by SuperPlayer - 12-06-2015, 12:59 PM
RE: stargate.setName - by 4N0NYM - 12-06-2015, 02:24 PM
RE: stargate.setName - by SuperPlayer - 12-06-2015, 02:28 PM

  • View a Printable Version
Forum Jump:


Users browsing this thread: 1 Guest(s)
Contact UsTeam Spartan Cookies & MilkReturn to TopLite (Archive) ModeMark all forums readRSS Syndication

Powered By MyBB, © 2002-2026 MyBB Group.