Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   requesturl() problem :x (https://forums.graalonline.com/forums/showthread.php?t=75569)

HolySheepy 07-16-2007 01:05 PM

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)

killerogue 07-16-2007 10:44 PM

I don't think requesturl() returns an object?

godofwarares 07-16-2007 10:49 PM

Quote:

Originally Posted by killerogue (Post 1331434)
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.

HolySheepy 07-17-2007 12:38 AM

only works again after 20 seconds or something
maybe spam block


All times are GMT +2. The time now is 01:04 PM.

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