I'm getting an error while trying to execute this script, it's still not completed yet, but that's not important.. the first event is.. which is where the error occurs.
when i execute it, i works till it leaves the [state entery] then i get this error message..
Malkie Talkie-DelPiero Endrizzi: HTTP parameter key 1 is not an integer
i have never seen it before... and i have no idea how to fix it. if anyone got any clue what seems to be the problem.. i'd appreciate it.. thank you
// Malka Com channel
// DelPiero Endrizzi
// Malkavians Rock!!
string CheckAvatar = "http://www.website.com/page.php?action=";
string ChannelRequest = "http://www.website.com/channel.php";
string Owner;
key CheckAvatarKey;
key GetChannel;
integer BrodcastChannel;
//integer ListenChannel;
default
{
state_entry()
{
Owner = llKey2Name(llGetOwner());
llSetObjectName("Malkie Talkie-"+Owner);
llSetObjectDesc(llEscapeURL(Owner));
llOwnerSay("Welcome to Malka's Communication Center!"
;llOwnerSay("Checking for permissions.. Please wait!"
;CheckAvatarKey = llHTTPRequest(CheckAvatar+llEscapeURL(Owner),[""],""
;}
http_response(key request_id, integer status, list metadata, string body)
{
llSay(0, Owner);
if(request_id != CheckAvatarKey){
llOwnerSay("Sorry!, There was an error occurred while trying to connect to server, please detach and reattach in a minute"
;llDetachFromAvatar();
}else if(status = 499){
llOwnerSay("Sorry!, There was an error occurred while trying to connect to server, please detach and reattach in a minute"
;llDetachFromAvatar();
}else if(status != 200){
llOwnerSay("Sorry!, There was an error occurred while trying to connect to server, please detach and reattach in a minute"
;llDetachFromAvatar();
}else if(body != "test"
{llOwnerSay("Sorry, You have no permission to use this device, Goodbye!"
;llDetachFromAvatar();
}else{
llOwnerSay("Thank you "+(string)Owner+" for waiting, you are now connected to the MCC"
;state logged;
}
}
}
state logged
{
state_entry()
{
GetChannel = llHTTPRequest(ChannelRequest,[""],""
;}
http_response(key request_id, integer status, list metadata, string body)
{
if(status == 499)
{
llOwnerSay("Sorry!, There was an error occurred while trying to connect to server, please detach and reattach in a minute"
;llDetachFromAvatar();
}
else if(status != 200)
{
llOwnerSay("Sorry!, There was an error occurred while trying to connect to server, please detach and reattach in a minute"
;llDetachFromAvatar();
}
else if(status = 200){
BrodcastChannel = (integer)body;
llSay(0 ,body);
state online;
}else{
llOwnerSay("Sorry!, There was an error occurred while trying to connect to server, please detach and reattach in a minute"
;llDetachFromAvatar();
}
}
}
state online
{
state_entry()
{
llListen(BrodcastChannel,"",Owner,""
;}
listen(integer channel, string name, key id, string message)
{
llOwnerSay(message);
}
}
