Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-16-2007, 01:05 PM
HolySheepy HolySheepy is offline
Registered User
Join Date: Apr 2007
Posts: 68
HolySheepy is on a distinguished road
requesturl() problem :x

so yeah i basically did
(styled, especially for you ...)
PHP Code:
//#CLIENTSIDE
function onWeaponFired(){
  
this.HTTPR requesturl"www.google.de" );
  
this.catcheventthis.HTTPR"onReceiveData""onGetData" );
}

function 
onGetData(){
  
player.chat "got data";

i cant destroy a this.httpr, then it will say
NPC Code:

this.HTTPR.destroy();


GraalScript: Function HTTP_www.google.de_80_/.destroy not found in script of Weapon HolySheepy/Controls

setting it to NULL/"" doesnt help either :/ because when i fire the weapon the second time the return code stays at -1 and receivedata isnt called(only updating the weapon/reconnect helps)
Reply With Quote
  #2  
Old 07-16-2007, 10:44 PM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
I don't think requesturl() returns an object?
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #3  
Old 07-16-2007, 10:49 PM
godofwarares godofwarares is offline
Webmaster
godofwarares's Avatar
Join Date: Dec 2006
Location: Florida
Posts: 552
godofwarares is on a distinguished road
Send a message via ICQ to godofwarares Send a message via AIM to godofwarares Send a message via MSN to godofwarares Send a message via Yahoo to godofwarares
Quote:
Originally Posted by killerogue View Post
I don't think requesturl() returns an object?
Yes it does.


------------
//#CLIENTSIDE
function onWeaponFired(){
this.HTTPR = requesturl( "www.google.de" );
this.catchevent( this.HTTPR, "onReceiveData", "onGetData" );
}

function onGetData(){
player.chat = "got data";
}

Try this:
PHP Code:
//#CLIENTSIDE
function onCreated()
{
temp.request requestUrl("http://www.google.de");
this.catchEvent(temp.request"onReceiveData""onData");
}

function 
onData(obj)
{
player.chat "Received Data!";

The only thing I did different was add the http: protocol in front of the URL.
__________________
What signature? I see no signature?
Reply With Quote
  #4  
Old 07-17-2007, 12:38 AM
HolySheepy HolySheepy is offline
Registered User
Join Date: Apr 2007
Posts: 68
HolySheepy is on a distinguished road
only works again after 20 seconds or something
maybe spam block
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:55 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.