Anonymous | Login | Signup for a new account | 19-04-25 21:45 CEST | ![]() |
Main | My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||
ID | Project | Category | View Status | Date Submitted | Last Update | |
0002368 | SphereServer | executable - windows build | public | 25-06-14 01:36 | 13-07-14 17:17 | |
Reporter | Coruja | |||||
Assigned To | Ben | |||||
Priority | normal | Severity | minor | Reproducibility | always | |
Status | closed | Resolution | no change required | |||
Platform | OS | OS Version | ||||
Product Version | ||||||
Target Version | Fixed in Version | |||||
Summary | 0002368: MIDILIST console error | |||||
Description | When the function MIDILIST is called on a NPC, sphere will return this console error: 20:34:ERROR:(sphere_region.scp,183)Undefined keyword 'MIDILIST' This error doesn't make sense, because MIDILIST is working fine -on players- but if called on NPC it will return 'undefined keyword', this text is wrong because ppl will think that this function have some problem or doesn't exist. to prevent this, MIDILIST always must check for ISPLAYER before called. Of course NPCs can't listen to MIDILIST, but I think this check must be done internally on sphere, like it was on SOUND function [REGIONTYPE r_something] ON=@Enter IF (<SRC.ISPLAYER>) SRC.MIDILIST=midi_approach //this must check for ISPLAYER to prevent console error ENDIF ON=@RegPeriodic SRC.SOUND={021f 1 0243 1 0244 1 0245 1} //this can be used without any check | |||||
Tags | No tags attached. | |||||
Nightly Version | Automated (specify build number) | |||||
Experimental Flags | None | |||||
Option Flags | None | |||||
Internal Build Number | ||||||
Attached Files | ||||||
![]() |
|
(0002306) Feeh (developer) 25-06-14 03:33 |
The problem here is that Player and NPC's are different objects internally. Both derives from Char object but one is Client object and other is CharNPC, so, a Client can access Char functions and CharNPC can also access char functions, but a Client can not access CharNPC function (or vice versa) even if they are derived from the same object. MIDILIST is defined inside Client object. Since scripts does not hold any information related to what object we are holding (rather than its reference), when you 'SRC.MIDILIST=xyz' you are saying to call MIDILIST verb on whatever object SRC reference is holding SOUND is a bit different, I see it as a sound source / make a game object emit a sound. It is defined on ObjBase which is a base to every game object I see no problem, in fact I'm indifferent about moving MIDILIST to Char object and verifying if the referenced object is a Client or not, but I must agree that it makes sense being a Client verb and not Char's |
(0002328) Ben (manager) 13-07-14 17:17 |
As a solution, just use MUSIC instead of MIDILIST. MUSIC is already defined in sphere_backward_compatibility.scp and checks for isplayer. You could also override MIDILIST directly to do the same. |
![]() |
|||
Date Modified | Username | Field | Change |
25-06-14 01:36 | Coruja | New Issue | |
25-06-14 03:33 | Feeh | Note Added: 0002306 | |
13-07-14 17:17 | Ben | Note Added: 0002328 | |
13-07-14 17:17 | Ben | Status | new => closed |
13-07-14 17:17 | Ben | Assigned To | => Ben |
13-07-14 17:17 | Ben | Resolution | open => no change required |
Copyright © 2000 - 2010 MantisBT Group |