I = Crazy over this problem. Please help, if you can...

Recommended Videos

jonnopon3000

New member
Feb 25, 2009
900
0
0
Hi fellow escapians, I have a problem. Please read this if you believe you can help

I was on a server in Gmod the other day, and saw someone making a screen that displays player stats such as name, steam ID, number of kills, number of deaths, if no-clip is on, and other minor things, using coding in an e2, a target finder and a console screen. He told me it was using a system in e2 called Wirelink that I had never heard of.

So, I looked on the Wiki and have managed to set up all the string commands (My screen displays name, steamID, player model), but I am having trouble with making it display numbers.

This is what my coding looks like for those who can help me: (this took AGES to type)

@Inputs: Player:entity Input:wirelink Writebutton Wipebutton
@Outputs: Pname:string Pmodel:string Psteamid:string Pkills Pdeaths Pnoclip
interval(10)


Pname = Player:name()
Pmodel = Player:model()
Psteamid = Player:steamID()
Pkills = Player:frags()
Pdeaths = Player:deaths()
Pnoclip = Player:inNoclip()


if(Writebutton == 1 & ~Writebutton)
{Input:writeString("NAME:",1 ,1, 990, 900), Input:writeString(Pname,10 ,1, 990, 900),
Input:writeString("MODEL:",1 ,2, 990, 900), Input:writeString(Pmodel,10 ,2, 990, 900),
Input:writeString(STEAMID:",1 ,3, 990, 900), Input:writeString(Psteamid,10 ,3, 990, 900)}


if(Wipebutton == 1 & ~Wipebutton) {Input:writeCell(2041, 1)}




There we go. End.


Now this is where I am stuck.

The parts highlighted in red on the @,inputs line and the first set of command lines are the ones that can't output in string (Text), only number.

My screen does display everything in string format properly, but I haven't been able to work out how to make it display numbers.

For example:
Input:writeString makes something write the values put after it as text onto the screen.
Input:writeCell(2041, 1) Wipes the screen.

But I simply cannot find a way to make the expression chip output numbers. I may be thinking too hard and WAY too much into it. It may be something really simple that I have done before, but have forgotten. But all I know is, it is not on the wiki (neither is most of the commands I used here), and I have been searching on Gmod's servers for people who know and everyone I have met happens to hate e2, and so do not know. I cannot find the original creator of the creation I basing this upon either. This results in the theory as follows:

I need help.

I am willing to give any extra information needed,or explain each minor command in detail for those who wish to learn. Sorry if you don't understand this, but it is advanced, as I said.


Side note: Many of you will probably reply by saying "you shouldn't be asking for help with this here", but I beliebve I should. Everytime I have come here in the past I have gotten information accurately and quickly. Other places just seem to shove questions and newbies aside, so I believe here is the best place for me to be asking this question.
 

jonnopon3000

New member
Feb 25, 2009
900
0
0
Ok I have also posted this on Wiremod.com forums. Something I didn't know about.

Still hoping for some help here though...please?

=D
 

Proteus214

Game Developer
Jul 31, 2009
2,270
0
0
I've honestly never done any work in Gmod, but I think you may be mixing your data types here. more often than not general writeString() functions work only on string data types. Is there a function/method/procedure that can convert an integer to a string?
 

DazZ.

Elite Member
Jun 4, 2009
5,540
0
41
Don't know the language, but have you tried storing the frags and red stuff in an "int" (integer) instead of a string.

So I don't know how that would be written.

Pkills:int perhaps?

Edit: Slightly ninjaed. Took me awhile to read the post through. :p
 

jonnopon3000

New member
Feb 25, 2009
900
0
0
D4zZ said:
Don't know the language, but have you tried storing the frags and red stuff in an int instead of a string.

So I don't know how that would be written.

Pkills:int perhaps?
Ah. See this was why I am confused-the original creation had YES or NO come up if you were in noclip or not-a text value from something that sends out a numeric value. This would sort my problems-I simply cannot find a way to make it display actual numbers, so if I could convert it to text it wold simply be a copy of the code I have above, with the Pnoclip output instead.
 

jonnopon3000

New member
Feb 25, 2009
900
0
0
Proteus214 said:
I've honestly never done any work in Gmod, but I think you may be mixing your data types here. more often than not general writeString() functions work only on string data types. Is there a function/method/procedure that can convert an integer to a string?
I know this, I have not tried to display or output the number using string commands. if you look closely-because I have not found a way to make it work, the ones that will output numbers I have left out of the coding for now.

I hope there is a method of turning an integer into a string. Even though for the Pkills and Pdeaths that would be useless. Sigh.
 

DazZ.

Elite Member
Jun 4, 2009
5,540
0
41
jonnopon3000 said:
D4zZ said:
Don't know the language, but have you tried storing the frags and red stuff in an int instead of a string.

So I don't know how that would be written.

Pkills:int perhaps?
Ah. See this was why I am confused-the original creation had YES or NO come up if you were in noclip or not-a text value from something that sends out a numeric value. This would sort my problems-I simply cannot find a way to make it display actual numbers, so if I could convert it to text it wold simply be a copy of the code I have above, with the Pnoclip output instead.
A yes/no output would be called a boolean, not a string/integer. So I'm guessing the noclip value is stored as that instead of an integer/string.
 

jonnopon3000

New member
Feb 25, 2009
900
0
0
D4zZ said:
jonnopon3000 said:
D4zZ said:
Don't know the language, but have you tried storing the frags and red stuff in an int instead of a string.

So I don't know how that would be written.

Pkills:int perhaps?
Ah. See this was why I am confused-the original creation had YES or NO come up if you were in noclip or not-a text value from something that sends out a numeric value. This would sort my problems-I simply cannot find a way to make it display actual numbers, so if I could convert it to text it wold simply be a copy of the code I have above, with the Pnoclip output instead.
A yes/no output would be called a boolean, not a string/integer. So I'm guessing the noclip value is stored as that instead of an integer/string.
Ok. I will check online now to see if boolean is a useable command in writing.

The command would probably look like: {Input:writeBoolean(Pnoclip,1 ,10, 990, 900)}
 

DazZ.

Elite Member
Jun 4, 2009
5,540
0
41
or it will be writeBool.

But whatever language it is in it should have a boolean variable.
 

jonnopon3000

New member
Feb 25, 2009
900
0
0
jonnopon3000 said:
D4zZ said:
jonnopon3000 said:
D4zZ said:
Don't know the language, but have you tried storing the frags and red stuff in an int instead of a string.

So I don't know how that would be written.

Pkills:int perhaps?
Ah. See this was why I am confused-the original creation had YES or NO come up if you were in noclip or not-a text value from something that sends out a numeric value. This would sort my problems-I simply cannot find a way to make it display actual numbers, so if I could convert it to text it wold simply be a copy of the code I have above, with the Pnoclip output instead.
A yes/no output would be called a boolean, not a string/integer. So I'm guessing the noclip value is stored as that instead of an integer/string.
Ok. I will check online now to see if boolean is a useable command in writing.

The command would probably look like: {Input:writeBoolean(Pnoclip,1 ,10, 990, 900)}

Just got a reply on the wiremod.com forums. To change a numeric output to a string output, the command would look like this:

if(Writebutton == 1 & ~Writebutton)
{input:writeString(toString(Pdeaths),10 ,15, 990, 900)}

This basically means:

If the button wired to the write function is on
Then:
Write Pdeaths to the screen, changing to the numeric value to string value, in position:
X = 10 ,Y=15, text colour = 990(black), background colour = 900(red)

It still displays as a number, except for the Noclip command, but it is like converting a song from mp3 to wma-it plays the same, it's just now other programmes can understand it.