Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Old Scripting Engine (GS1)
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-05-2008, 01:59 AM
johny023 johny023 is offline
Registered User
Join Date: Dec 2006
Posts: 36
johny023 is on a distinguished road
why does this happen?

i built a refrigerator for my offline world, it's basically just stores food so you don't have to clutter your inventory or if you just don't feel like getting food you can take some of the food you stored in the refrigerator.

i made it and it worked fine for a while, but then it started making graal crash when you took something out, and it doesn't happen every time but it does happen a lot. when graal crashes it just freezes and if i press F4 to go back to the editor mode it only half opens it and that also freezes, but i get a error message that says

" Access violation at address 00402FCO in module "GraalEditor.exe', Read of address 40EFE3FC " why does this happen? this is how i scripted it..

this part of the script is in the refrigerator

if (actionapressed) {
sleep 0.1;
foodselect = 3;
disableweapons;
timeout = 0.05;
}

" foodselect = 3; " opens 2 menus that show what's in your invitory and what's in the refrigerator. then i click on the item on the menu i want

if (actionleftmouse){
triggeraction fridgex+1,fridgey+1,tsoda,soda;
putnpc block.gif,frigesoda.txt,x,y;
}

that places the weapon that goes to your invitory then sends a triggeraction to the refrigerator saying that you took 1 soda out

refrigerator's script

if (actiontsoda){
foodselect = 0;
sleep 0.2;
this.soda -= 1;
foodselect = 3;
timeout = 0.05;
}

weapon's script
// NPC made by john
if (created) {
}

if (playerenters && !isweapon){
toweapons /Coke;
if (!isweapon) destroy;
}

if (weaponfired){
setani drink_potion,soda1.gif;
playerhealth += 30;
stamina += 50;
playerfood += 30;
destroy;
}

if (isweapon){
setimg soda1.gif;
}

it was working for a day or two.. but now it randomly freezes when i use it. there's more script in the npcs but that's the script that's being used.

i know that won't work online.. it's a offline world, but i would like to know why this happens and how to fix it?
Reply With Quote
 


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 08:41 PM.


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