Search found 148 matches

by Guy71173cp
12 Jun 2012, 17:24
Forum: SmartFoxServer 1.x Discussions and Help
Topic: How To Check Database For Number of Coins?
Replies: 43
Views: 43970

Re: How To Check Database For Number of Coins?

Well, I am on vacation at the moment, so I can't debug because I don't have Flash on this laptop. But, could the gotoAndStop(resObj.afro1frame) be the problem? I mean the resObj? Is it possible to go to a resObj frame number outside of the onExtensionResponse? Im saying this because I think that the...
by Guy71173cp
09 Jun 2012, 14:55
Forum: SmartFoxServer 1.x Discussions and Help
Topic: How To Check Database For Number of Coins?
Replies: 43
Views: 43970

Re: How To Check Database For Number of Coins?

Of course, I am having another problem with the frame variable, which SHOULD be very simple. I put this in my extension if you have enough coins: response.AFRO1FRAME = 2 And I put this if you do not have enough coins: response.AFRO1FRAME = 1 But the client does not work (onExtensionResponse): _globa...
by Guy71173cp
09 Jun 2012, 02:42
Forum: SmartFoxServer 1.x Discussions and Help
Topic: How To Check Database For Number of Coins?
Replies: 43
Views: 43970

Re: How To Check Database For Number of Coins?

Hello. I decided to just make one big command that checks the coins then updates. And it works! But, I have a question. Is it possible to create a variable on the server-side with the response.afro1 object as a value so that can be a frame? What I mean is add a variable like response.AFRO1FRAME = re...
by Guy71173cp
08 Jun 2012, 16:20
Forum: SmartFoxServer 1.x Discussions and Help
Topic: How To Check Database For Number of Coins?
Replies: 43
Views: 43970

Re: How To Check Database For Number of Coins?

I am still not sure what the problem is. It seems like the command is called, but it doesn't do anything.
by Guy71173cp
08 Jun 2012, 03:04
Forum: SmartFoxServer 1.x Discussions and Help
Topic: How To Check Database For Number of Coins?
Replies: 43
Views: 43970

Re: How To Check Database For Number of Coins?

In the extension I deleted the } else if (cmd == "updAfroData") { var sql = "UPDATE users SET "; sql += " AFRO1='"+_server.escapeQuotes(params.AFRO1)+"'"; sql += " WHERE NAME='"+_server.escapeQuotes(params.NAME)+"'"; var success = dbase.exe...
by Guy71173cp
07 Jun 2012, 22:06
Forum: SmartFoxServer 1.x Discussions and Help
Topic: How To Check Database For Number of Coins?
Replies: 43
Views: 43970

Re: How To Check Database For Number of Coins?

I added a trace: function handleRequest(cmd, params, user, fromRoom) { trace(cmd); And the updAfroData command appears in the server when I call it. But nothing happens. Strangely, when I delete the updAfroData command in the extension, the updAfroData command still appears in the server. Any help i...
by Guy71173cp
07 Jun 2012, 22:06
Forum: SmartFoxServer 1.x Discussions and Help
Topic: How To Check Database For Number of Coins?
Replies: 43
Views: 43970

Re: How To Check Database For Number of Coins?

I added a trace: function handleRequest(cmd, params, user, fromRoom) { trace(cmd); And the updAfroData command appears in the server when I call it. But nothing happens. Strangely, when I delete the updAfroData command in the extension, the updAfroData command still appears in the server. Any help i...
by Guy71173cp
06 Jun 2012, 23:33
Forum: SmartFoxServer 1.x Discussions and Help
Topic: How To Check Database For Number of Coins?
Replies: 43
Views: 43970

Re: How To Check Database For Number of Coins?

Ok I added a trace:

Code: Select all

} else if (cmd == "updAfroData") {
         trace("Command was called")
         
      
         
      }


And when I click the save button (which calls the function), nothing traces. All the other commands in the extension work, though. Any help?
by Guy71173cp
06 Jun 2012, 18:43
Forum: SmartFoxServer 1.x Discussions and Help
Topic: How To Check Database For Number of Coins?
Replies: 43
Views: 43970

Re: How To Check Database For Number of Coins?

Ok well for some reason the extension isn't being called. Here is the onExtensionResponse: } else if (resObj._cmd == "updAfroData") { delete resObj._cmd; var row = _global.myName; _global.theAfro1 = myDonut.av_pieces.av_afro1.gotoAndStop(resObj.AFRO1) Here is the function: function updateA...
by Guy71173cp
05 Jun 2012, 00:34
Forum: SmartFoxServer 1.x Discussions and Help
Topic: How To Check Database For Number of Coins?
Replies: 43
Views: 43970

Re: How To Check Database For Number of Coins?

Ok I got the outfits working. But I have a problem with updating the database. My problem is that I declare the variables inside the onExtensionResponse handler because I need the data from the extension. But then I can't update the database because it's in that function. How would I achieve this? I...
by Guy71173cp
04 Jun 2012, 16:33
Forum: SmartFoxServer 1.x Discussions and Help
Topic: How To Check Database For Number of Coins?
Replies: 43
Views: 43970

Re: How To Check Database For Number of Coins?

Hello. I am not sure how I would do this. If I set a variable in the onExtensionResponse handler, then the variable won't be available anywhere else. How would I set the variable in the onExtensionResponse handler and set it so you can use it anywhere? This is the code so far: if (type == "xml&...
by Guy71173cp
03 Jun 2012, 21:52
Forum: SmartFoxServer 1.x Discussions and Help
Topic: How To Check Database For Number of Coins?
Replies: 43
Views: 43970

Re: How To Check Database For Number of Coins?

Ok. I get what you are saying, but how would I check the database from the client?
by Guy71173cp
03 Jun 2012, 19:23
Forum: SmartFoxServer 1.x Discussions and Help
Topic: How To Check Database For Number of Coins?
Replies: 43
Views: 43970

Re: How To Check Database For Number of Coins?

I found a new problem. I made it so when you click an item, it first checks if you have enough coins and if you do you get the item and vice-versa. But the user still gets an item even if they don't have enough coins, but when they log back in, they don't have it which is right. And I know this is a...
by Guy71173cp
03 Jun 2012, 00:28
Forum: SmartFoxServer 1.x Discussions and Help
Topic: How To Check Database For Number of Coins?
Replies: 43
Views: 43970

Re: How To Check Database For Number of Coins?

Hello. So far I have tried to retrieve the data from the database, but I keep getting undefined. It was working fine, but I changed the SQL statement to var sql = "SELECT COUNT (NAME) FROM USERS WHERE NAME='"+user.getName()+"'"; because I had to get that user's coins and now it s...

Go to advanced search