• Why is this not working?
    8 replies, posted
I'm trying to make a useful e2 extensions, but it's not working and I dont't know why. This is the part that gives an error: ----------------------------------------- local screenPos = this:GetPos():ToScreen() ----------------------------------------- this is the actual error: ----------------------------------------- sv: Expression 2 (xThaWolfx): entities/gmod_wire_expression2/core/custom/onscreen.lua:7: attempt to call method 'ToScreen' (a nil value) ----------------------------------------- help? :D
What is this? (the variable) [editline]01:35PM[/editline] You may want to check that this:GetPos() returns a valid vector before you ToScreen it.
[QUOTE=MakeR;21565863]"What is this? (the variable)" in a normal e2 extensions this is the entity, and thats not causing the error so why bother? [editline]01:35PM[/editline] "You may want to check that this:GetPos() returns a valid vector before you ToScreen it."<-----?[/QUOTE]
You are running this on the server, it needs to be on the client. [editline]01:41PM[/editline] [b][url=http://wiki.garrysmod.com/?title=Vector.ToScreen]Vector.ToScreen [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] client side only.
[QUOTE=MakeR;21565920]You are running this on the server, it needs to be on the client. [editline]01:41PM[/editline] [b][url=http://wiki.garrysmod.com/?title=Vector.ToScreen]Vector.ToScreen [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] client side only.[/QUOTE] omg...I'm an idiot.. thanks!
No problem.
[QUOTE=MakeR;21566007]No problem.[/QUOTE] but now I have a next problem -__- I removed the server side file, and made it client side. But now the extension doesn't show up in the e2 ): Edit: K it shows up, it just doesn't work now -_-
I have no idea how e2 works, are there any other errors?
[QUOTE=MakeR;21566037]I have no idea how e2 works, are there any other errors?[/QUOTE] not really, there are no other bugs Edit: And now it doesn't show up again -______________-
Sorry, you need to Log In to post a reply to this thread.