Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-06-2014, 02:42 AM
khortez khortez is offline
PrototypeX
khortez's Avatar
Join Date: Dec 2008
Posts: 91
khortez will become famous soon enough
need a solution for repeated error message in RC

i was trying to create a gui window but for some reason i keep getting this error message: "Script: Function addcontrol not found " can someone tell me a solution for that?



edit: i don't think it's the code but if necessary, i'll provide it

editx2 : i still don't have a clue of why it was acting the way it did.. so if anyone wants to give me possible reasons for why it was saying that i would be grateful so i could fix it/prevent it in the future. though it's fine now

Last edited by khortez; 02-06-2014 at 06:30 PM..
Reply With Quote
  #2  
Old 02-12-2014, 06:35 AM
khortez khortez is offline
PrototypeX
khortez's Avatar
Join Date: Dec 2008
Posts: 91
khortez will become famous soon enough
PHP Code:
function onCreated(){
  new 
GuiShowImgCtrl("Selected_Pocket"){
    
30;
    
30;
    
height 100;
    
width 100;
  }

was working fine, for awhile. then i got the error again, so i have to look back here once more for help. any ideas what's wrong?
Reply With Quote
  #3  
Old 02-12-2014, 10:20 AM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,057
Torankusu has a spectacular aura aboutTorankusu has a spectacular aura about
Have you tried naming the control a different name? (Removing the selected). Also you dont have clientside indicator in your snippet, but that part is under //#CLIENTSIDE right?

Shot in the dark.
__________________
Quote:
Originally posted by Spark910
Think befreo you type.
Reply With Quote
  #4  
Old 02-12-2014, 05:20 PM
khortez khortez is offline
PrototypeX
khortez's Avatar
Join Date: Dec 2008
Posts: 91
khortez will become famous soon enough
Quote:
Originally Posted by Torankusu View Post
Have you tried naming the control a different name? (Removing the selected). Also you dont have clientside indicator in your snippet, but that part is under //#CLIENTSIDE right?

Shot in the dark.
yeah it's under //#CLIENTSIDE, and yeah it's had different names before, but it never makes a difference what name it is it feels like for this error to appear, as just to test it, i have used the default code provided in graal bible just to see if this error would appear and it did still. it oddly appears after i copy/paste my code from one weapon to another. at least that's the only time i can recall seeing it. the one single time i fixed it before, was when i had manually re-written the code from scratch, this time though apparently, that won't work. i'll try renaming the control again though. thanks for the help


edit: I just changed the name to "Pocket" then changed the control name to "Test_Window", it still for some reason can't create the control. Also just in case.. i notice it doesn't have an image set to it but, it doesn't matter because it won't allow me to create the control in the first place

Last edited by khortez; 02-12-2014 at 05:33 PM..
Reply With Quote
  #5  
Old 02-22-2014, 03:16 AM
beckett164 beckett164 is offline
Registered User
beckett164's Avatar
Join Date: Feb 2007
Posts: 2
beckett164 is on a distinguished road
I think that you may need to give the control a profile.

Quote:
//#CLIENTSIDE
function onCreated() {
new GuiBitmapCtrl("MyGUI_Bitmap1") {
profile = GuiDefaultProfile; // <----- LIKE THIS
bitmap = "login_gradient_blue.png";
height = 80;
width = 120;
x = 687;
y = 258;
}
I'm just assuming that's how it goes because the client-rc gui compiler always generates controls like that.
Reply With Quote
  #6  
Old 02-24-2014, 05:35 PM
MysticalDragon MysticalDragon is offline
Global Administration
MysticalDragon's Avatar
Join Date: Oct 2002
Location: Lynn Ma
Posts: 883
MysticalDragon is just really niceMysticalDragon is just really nice
Send a message via AIM to MysticalDragon Send a message via MSN to MysticalDragon
Looks the that container that's calling addcontrol is missing :O
__________________
~Delteria Support
~Playerworld Support
~PWA Chief
http://support.toonslab.com
[email protected]



Reply With Quote
  #7  
Old 03-24-2014, 09:24 PM
khortez khortez is offline
PrototypeX
khortez's Avatar
Join Date: Dec 2008
Posts: 91
khortez will become famous soon enough
Quote:
Originally Posted by MysticalDragon View Post
Looks the that container that's calling addcontrol is missing :O
Not entirely sure what you mean , but while i recognize this is a somewhat old thread, i'm posting my appreciation to those that helped me. for some time i actually thought i'd have to try and solo it somehow.

that said, what exactly did you mean by the container that's calling addcontrol is missing? i couldn't tell much difference because it looked the same as other GUI's i created code-wise. thanks again
Reply With Quote
  #8  
Old 03-25-2014, 12:07 AM
Jakov_the_Jakovasaur Jakov_the_Jakovasaur is offline
Deleted by Darlene159
Jakov_the_Jakovasaur's Avatar
Join Date: Sep 2013
Location: Deleted by Darlene159
Posts: 353
Jakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud of
hello!

if you are receiving this error in remote control then it appears '//#CLIENTSIDE' (no white spaces before or afterwards) is not being set properly, as only serverside functions should be producing such a message

if you add echo("test" SPC player.account); within onCreated, press F2, go to 'scripts', and you see your account name, then you will know it is occurring clientside as it should be, if you just see "test " within remote control chat then it is definitely occurring serverside
__________________
This signature has been deleted by Darlene159.
Reply With Quote
  #9  
Old 03-25-2014, 05:25 PM
khortez khortez is offline
PrototypeX
khortez's Avatar
Join Date: Dec 2008
Posts: 91
khortez will become famous soon enough
Quote:
Originally Posted by Jakov_the_Jakovasaur View Post
hello!

if you are receiving this error in remote control then it appears '//#CLIENTSIDE' (no white spaces before or afterwards) is not being set properly, as only serverside functions should be producing such a message

if you add echo("test" SPC player.account); within onCreated, press F2, go to 'scripts', and you see your account name, then you will know it is occurring clientside as it should be, if you just see "test " within remote control chat then it is definitely occurring serverside
i guess that may have been something i overlooked when i copied/pasted my code into another weapon, however simple as it may have been, thanks for the help everyone
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 11:52 PM.


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