Jump to content

[Community Resource / Request] Phone Numbers!


XetaQuake

Recommended Posts

ok, i think i have an idea for the SMS, you have phoneinfo, which has the number and a phone book, then you make a smsifo table, which would be a seperate table, but in the same resource, that woul hold readSMS and unreadSMS. would that work? also, i got the betterweather resource implemented, but i had to export a function that wasnt already exported (i think it wasnt exported on purpose, but idk why not). that works. as for my own SMS, i couldnt quite get it working. ill get the latest version tho and try the idea about seperate tables in the same resource, ill get back to you on that. it will be about 2 hours tho, because im about to put some videos on my new MP4 player.

Link to comment
  • Replies 174
  • Created
  • Last Reply

Top Posters In This Topic

Or we just use .xml :)

Am already using for skin. :P

About the skin: I've been working on it. Green light! Or well... It works. I guess, doesn't give anymore errors and the GUI loads, so it should atleast be positive. :)

But to go back on topic: I can do it in XML. I'll try it. :P

Link to comment
Or we just use .xml :)

Am already using for skin. :P

About the skin: I've been working on it. Green light! Or well... It works. I guess, doesn't give anymore errors and the GUI loads, so it should atleast be positive. :)

But to go back on topic: I can do it in XML. I'll try it. :P

LOL why didn't you think about this earlier? :D

Because... I'm still not making any progress due to a few difficulties... I'll continue tomorrow.

Link to comment
there is a BIG problem: SQL doesn't support the huge length of 15 SMS' with 160(actually, 168) chars and my guess is that we need to go to MySQL. Which is alot harder for the customer...

Oh noo thats bad :/

A alternative: smaller SMS? So there is a limit of chars or so.

Is this Limit only for one table or in the whole database?

Well, the IRL limit is 160. It also has that same 160 limit. But that's too big... =/

Hmm, something's not right if that's the limit...if I'm understanding the sql table you created you're storing all the users SMSs in one column?

I think GioSerpo is right when he suggests a two table approach.

phoneOwner table

username (Primary Key)

phonenumber

SMS table (a new row for each SMS entry)

username (Foreign Key)

SMSMessage (main body of SMS message)

ReadStatus (for holding a true/false)

to me, that's a better structure to hold the data as it's a more normalised approach, is more flexible and more scalable than the original structure?

Link to comment
Make a GUI window for something like "Yellow Pages" which will show all the players numbers.

Some people won't want to be randomly called in game :) some will want to be ex-directory :)

I'd rather it have the option to add people to a contacts list, than display EVERYONE'S numbers.

You could add a checkbox or radio, so if the box is checked you mark this number to be allowed to be seen in "Yello Pages"

Link to comment
Well, the IRL limit is 160. It also has that same 160 limit. But that's too big... =/

Hmm, something's not right if that's the limit...if I'm understanding the sql table you created you're storing all the users SMSs in one column?

I think GioSerpo is right when he suggests a two table approach.

phoneOwner table

username (Primary Key)

phonenumber

SMS table (a new row for each SMS entry)

username (Foreign Key)

SMSMessage (main body of SMS message)

ReadStatus (for holding a true/false)

to me, that's a better structure to hold the data as it's a more normalised approach, is more flexible and more scalable than the original structure?

Ok first, 160 is the limit for IRL SMS's, not the SQL! xD

I don't even know the SQL limits... :S

About your addition to Gio's suggestion, it kind of makes sence, but are you sure it'll all fit? What if the TOTAL space is a problem? But well I'll try. It'll probably give less trouble than my current XML cr@p... xD

But well, homework first, MTA second... :(

Link to comment

I know, I meant that 160 * 15 seems like a small amount of data to be causing problems!

it's more likely that it's a problem with column data length...2400 is quite a bit of text for one column to handle (though I had originally assumed that BLOBs were quite large), as opposed to 15 rows with each holding a column containing 160 characters.

just had a quick look, and got found the current implementation of BLOB in SQL Lite, has a max length of 2147483647, so 160*15 should be fine.

So maybe it's a problem with the MTA command that reads/writes that data, rather than SQL itself? in this case, maybe the change of DB structure to a 2 table approach will be more successful?

Link to comment
Hey all.

When i see right, the limit is at 128 Bytes

Here you can find all limits: http://publib.boulder.ibm.com/infocente ... 001029.htm :)

But yea i think .xml is a good alternative, or not? :wink:

Table 9. String Limits Description Limit

Maximum length of CHAR (in bytes) 254

Maximum length of VARCHAR (in bytes) 32 672

Maximum length of LONG VARCHAR (in bytes) 32 700

Maximum length of CLOB (in bytes) 2 147 483 647

Maximum length of GRAPHIC (in characters) 127

Maximum length of VARGRAPHIC (in characters) 16 336

Maximum length of LONG VARGRAPHIC (in characters) 16 350

Maximum length of DBCLOB (in characters) 1 073 741 823

Maximum length of BLOB (in bytes) 2 147 483 647

Maximum length of character constant 32 672

Maximum length of graphic constant 16 336

Maximum length of concatenated character string 2 147 483 647

Maximum length of concatenated graphic string 1 073 741 823

Maximum length of concatenated binary string 2 147 483 647

Maximum number of hex constant digits 16 336

Maximum size of a catalog comment (in bytes) 254

Largest instance of a structured type column object at run time (in gigabytes) 1

:P

Link to comment

Churchill, it was the toggleWeatherReport function, i had to export it cause the exports you had were all returning nil. and my guess on why you didnt export it it cause it is the main thing for the whole resource, lol... anyway, i cant get the SMS to save, even with the two table approach. sorry it took so long for the reply, but i had to change fomats of a few of the vids i had. sry...

EDIT: While this is on my mind... i found a sort of bug. like if someone types /pda (or in my case, pushes Z) ore than once, it will open the PDA however many times they typed it, and only one instance can be closed... im goin to work on fixing that, right now, lol

Link to comment

EDIT: While this is on my mind... i found a sort of bug. like if someone types /pda (or in my case, pushes Z) ore than once, it will open the PDA however many times they typed it, and only one instance can be closed... im goin to work on fixing that, right now, lol

Yea i know, thats the reason why i comment out the line to open the PDA with Z :P

I was too lazy to fix it, it was just a Prototyp...there was the possibility that we not uses the GUI.

But now, yea, i think its needful to fix it :D

Link to comment

EDIT: While this is on my mind... i found a sort of bug. like if someone types /pda (or in my case, pushes Z) ore than once, it will open the PDA however many times they typed it, and only one instance can be closed... im goin to work on fixing that, right now, lol

Yea i know, thats the reason why i comment out the line to open the PDA with Z :P

I was too lazy to fix it, it was just a Prototyp...there was the possibility that we not uses the GUI.

But now, yea, i think its needful to fix it :D

Well, the SQL issue is a little bigger issue... How we gonna try and solve it? Since Gio already stated 2 tables doesn't work and converting it to XML is ALOT of work... :(

Link to comment
Since Gio already stated 2 tables doesn't work and converting it to XML is ALOT of work... :(

But i think XML are the only possibility :?

Hmmm, whats with a SMS table for only one player? is that possible? So the user "XYZ" haves a table with all writen SMS :wink: Or is that exactly that what Gio already tryed?

Link to comment

I still don't understand WHY a two table approach won't work. What happens when you try it? what error messages? What sort of problem is occuring etc.

Also, GioSerpo: Could you do a mock up of how you tried to use the BetterWeather system originally, so I can see what the problem is and fix it? :)

Link to comment
I still don't understand WHY a two table approach won't work. What happens when you try it? what error messages? What sort of problem is occuring etc.

Also, GioSerpo: Could you do a mock up of how you tried to use the BetterWeather system originally, so I can see what the problem is and fix it? :)

I'll try and find out today. And the BetterWeather external commands just returned nil. Have you tried them before release? :P

EDIT:

***** NEWS FLASH *****

Guess what? Results are looking better! Not just random better, but really GOOD for once! :D

It really seems that putting everything in 1 query was the problem. The query seemed to be too long, and the database couldn't handle all those things after eachother. Fortunately, I fixed it, and light testing made it seem like it worked! I tested it on my own, with about 160 characters per message. All a's. xD

I really need to test this more, but so far it's looking awesomely good. :)

A release might come soon. Which includes:

-Fully working SMS. (atleast, I hope)

-Customizable skin by XML. (done, not yet tested)

-Character count in message window.

-Remove button to remove SMS messages. :P

(-Alot of commented crap including debugmessages and a small part of XML... ^^)

Let's hope I find the time to finish all this and more soon. ;)

Link to comment
I'll try and find out today. And the BetterWeather external commands just returned nil. Have you tried them before release? :P

EDIT:

***** NEWS FLASH *****

Guess what? Results are looking better! Not just random better, but really GOOD for once! :D

It really seems that putting everything in 1 query was the problem. The query seemed to be too long, and the database couldn't handle all those things after eachother. Fortunately, I fixed it, and light testing made it seem like it worked! I tested it on my own, with about 160 characters per message. All a's. xD

I really need to test this more, but so far it's looking awesomely good. :)

A release might come soon. Which includes:

-Fully working SMS. (atleast, I hope)

-Customizable skin by XML. (done, not yet tested)

-Character count in message window.

-Remove button to remove SMS messages. :P

(-Alot of commented crap including debugmessages and a small part of XML... ^^)

Let's hope I find the time to finish all this and more soon. ;)

Thats ma boyy!!! Keep it up :wink:

Link to comment

It really seems that putting everything in 1 query was the problem. The query seemed to be too long, and the database couldn't handle all those things after eachother. Fortunately, I fixed it, and light testing made it seem like it worked! I tested it on my own, with about 160 characters per message. All a's. xD

that's what I was referring to when I said that it was more likely a problem with the MTA command rather than a db issue. :)

Link to comment

It really seems that putting everything in 1 query was the problem. The query seemed to be too long, and the database couldn't handle all those things after eachother. Fortunately, I fixed it, and light testing made it seem like it worked! I tested it on my own, with about 160 characters per message. All a's. xD

that's what I was referring to when I said that it was more likely a problem with the MTA command rather than a db issue. :)

Wrong I think, after a quick google it seems to be an SQL problem.

If you are using string, you can not passed a string that has length more than 255 characters in VFP, it will return line too long error message. You have to separate it using "bla bla bla "+"bla bla bla"

Now the line was DEFINITELY over the 255, so there could be truth in this. Also I tried to see if it would take 2520 characters, which seemed to be too long? :P

Anyway, I'm having some difficulty. When the client shuts-down, it should send SMS data to the server.

However, a quick check revealed that it doesn't trigger! I noticed that onClientPlayerQuit doesn't work, that was something I could find on the wiki. But onClientResourceStop also doesn't seem to trigger... Is it possible to trigger something while quitting? I still need to test some things, but still I don't know... =/

Link to comment
[..]

Both onClientPlayerQuit and onClientResourceStop are useless if you want to capture and synchronize data with the server for local players. When a client quits it doesn't say goodbye it is just gone...

What you are looking for is the server-side equivalent onPlayerQuit. However data should be stored beforehand because once the client disconnects it can not send it anymore.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...