Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-19-2011, 03:29 AM
dabblercody dabblercody is offline
Tech Assistant
dabblercody's Avatar
Join Date: May 2006
Location: Florida
Posts: 22
dabblercody is on a distinguished road
Quadratic Formula

If anyone can figure out why this formula won't work on Graal.

http://en.wikipedia.org/wiki/Quadrat...dratic_formula


PHP Code:
//#CLIENTSIDE
function onPlayerChats()
{
 if (
player.chat == "/quad")
 {
  
Quad();
 }
}

function 
Quad()
{
 
temp.5;
 
temp.27;
 
temp.10;
 
temp.x1 = (-temp.+ ((temp.b*temp.b-4*temp.a*temp.c)^0.5))/2*temp.a;
 
temp.x2 = (-temp.- ((temp.b*temp.b-4*temp.a*temp.c)^0.5))/2*temp.a;
 
player.chat "Solution is:" SPC temp.x1 SPC temp.x2;

__________________
Dabbler

"Our work is the presentation of our capabilities."
- Goethe, Johann Wolfgang Von
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 01:55 PM.


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