Hud2
icon_state = "2"
Click()
call(usr,"Say")()
screen_loc = "2,1"
This sorta works but you can't type a message so I tried:
Hud2
icon_state = "2"
Click()
call(usr,"Say")(msg as text)
screen_loc = "2,1"
Then I get error:msg:undefined Var ,warning: statement has no effect ,as :warning: unused label. I'm pretty sure that's because I'm using call()wrong but that's the way I understood it can someone help me.
oh yeah my say verb(alot of this is text filtering/logging gotta keep the game chat clean and recorded!)
Say(msg as text)
set category = "Actions"
if(filter(msg,profane) == TRUE)
src.profane()
return
if(filter(msg,bannedwords) == TRUE)
src.bannedwords()
return
else
if(spamcheck == TRUE)
src << "Too much spam please don't spam!"
return
else
src.spamcheck()
view() << "<font color=red>[guilld]</font>{{[title]}}[src] Say: [msg]"
if(log == 1)
text2file("[time2text(world.realtime)]:[src] said, [msg]","log.txt")
Yes, you are using it horribly wrong. For one, you shouldn't even be using it here. Just type usr.Say(), instead of call().
The method of passing arguments in call() isn't by actually passing the type of argument, but by passing the argument itself---a string. I would think that if you left off the second set of parentheses on the first call(blah)() and just made it call(blah), it might work how you want it to. Still, this is horrible abuse. There is no reason to use call() here. This just prevents the compiler from detecting bugs in your game.
Hiead
Hiead