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 01-21-2006, 04:14 AM
Moondeath_2 Moondeath_2 is offline
"..."
Moondeath_2's Avatar
Join Date: Jan 2006
Location: Far Far Away.
Posts: 238
Moondeath_2 is an unknown quantity at this point
Send a message via AIM to Moondeath_2 Send a message via MSN to Moondeath_2 Send a message via Yahoo to Moondeath_2
Strange server side error..

For some reason this script triggers off a error but i don't know why it does maybe i'm ignorant but here it is and yes it is triggered to serverside but it says this stupid error though.

NPC Code:
    
case "summon-u":
p = findplayer(params[1]);
p.setlevel2(player.level,player.x,player.y);
break;

case "add-i":
tokens = player.chat.tokenize();
p = findplayer(tokens[1]);
p.addweapon(tokens[2]);
break;



GraalScript: Function setlevel2 not found at line 22 in script of MD/Tool (in level event_swimrace3.nw at pos (0, 0))
All local db npcs from level event_swimrace3.nw have been removed
GraalScript: Function addweapon not found at line 40 in script of MD/Tool (in level event_swimrace3.nw at pos (0, 0))
__________________
Aim: DarkFireXZ3
Email: [email protected] or [email protected]
Common Location: Unholy Nation
Gscript, Playerworld Rules, Support Center
Reply With Quote
  #2  
Old 01-21-2006, 04:24 AM
Rick Rick is offline
PipBoy Extraordinaire!
Rick's Avatar
Join Date: Jul 2004
Location: Long Beach, California.
Posts: 831
Rick is on a distinguished road
Well, I'm probably wrong but it doesn't look like you're checking to make sure the result from findPlayer succeeded.
Reply With Quote
  #3  
Old 01-21-2006, 04:27 AM
Moondeath_2 Moondeath_2 is offline
"..."
Moondeath_2's Avatar
Join Date: Jan 2006
Location: Far Far Away.
Posts: 238
Moondeath_2 is an unknown quantity at this point
Send a message via AIM to Moondeath_2 Send a message via MSN to Moondeath_2 Send a message via Yahoo to Moondeath_2
Well it does go through the people receive items and it summons so i don't know what the problem is. :/
__________________
Aim: DarkFireXZ3
Email: [email protected] or [email protected]
Common Location: Unholy Nation
Gscript, Playerworld Rules, Support Center
Reply With Quote
  #4  
Old 01-21-2006, 04:28 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
It's probably because 'p' is NULL ('findplayer' did not find the player).

EDIT: Rick beat me . Adding a check will get rid of that:
PHP Code:
if (!= NULL) {


__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #5  
Old 01-21-2006, 04:52 AM
Moondeath_2 Moondeath_2 is offline
"..."
Moondeath_2's Avatar
Join Date: Jan 2006
Location: Far Far Away.
Posts: 238
Moondeath_2 is an unknown quantity at this point
Send a message via AIM to Moondeath_2 Send a message via MSN to Moondeath_2 Send a message via Yahoo to Moondeath_2
Quote:
Originally Posted by napo_p2p
It's probably because 'p' is NULL ('findplayer' did not find the player).

EDIT: Rick beat me . Adding a check will get rid of that:
PHP Code:
if (!= NULL) {



Weapon/GUI-script MD/Tool added/updated by Moondeath_2
Player: Moondeath_2 has logged on GV-4.03.
New Client-RC: *Moondeath_2 (Moondeath_2)

I then summoned Nitro, so yes it got rid of the error except for the item giver.

Edit: Nevermind that it does work, thanks.
__________________
Aim: DarkFireXZ3
Email: [email protected] or [email protected]
Common Location: Unholy Nation
Gscript, Playerworld Rules, Support Center
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 03:03 PM.


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